Пример #1
0
def repository(wait_for_ansible):
    repositories = RepositoryCollection()
    repository = repositories.create(fauxfactory.gen_alpha(),
                                     REPOSITORIES[0],
                                     description=fauxfactory.gen_alpha())
    yield repository
    repository.delete()
def ansible_repository(wait_for_ansible):
    repositories = RepositoryCollection()
    repository = repositories.create(
        fauxfactory.gen_alpha(),
        "https://github.com/quarckster/ansible_playbooks",
        description=fauxfactory.gen_alpha())
    yield repository
    repository.delete()
Пример #3
0
def ansible_repository(appliance, wait_for_ansible):
    repositories = RepositoryCollection(appliance=appliance)
    repository = repositories.create(
        name=fauxfactory.gen_alpha(),
        url="https://github.com/quarckster/ansible_playbooks",
        description=fauxfactory.gen_alpha())
    yield repository

    if repository.exists:
        repository.delete()
Пример #4
0
def ansible_repository(appliance):
    repositories = RepositoryCollection(appliance=appliance)
    repository = repositories.create(
        fauxfactory.gen_alpha(),
        REPOSITORIES[0],
        description=fauxfactory.gen_alpha())

    yield repository

    if repository.exists:
        repository.delete()
Пример #5
0
def test_embed_tower_playbooks_list_changed(wait_for_ansible):
    "Tests if playbooks list changed after playbooks repo removing"
    playbooks = []
    repositories_collection = RepositoryCollection()
    for repo_url in REPOSITORIES:
        repository = repositories_collection.create(
            fauxfactory.gen_alpha(),
            repo_url,
            description=fauxfactory.gen_alpha())
        playbooks.append(repository.playbooks.all())
        repository.delete()
    assert not set(playbooks[1]).issuperset(set(playbooks[0]))
Пример #6
0
def test_embedded_ansible_repository_crud(request, wait_for_ansible):
    repositories = RepositoryCollection()
    repository = repositories.create(fauxfactory.gen_alpha(),
                                     REPOSITORIES[0],
                                     description=fauxfactory.gen_alpha())

    @request.addfinalizer
    def _delete_if_exists():
        if repository.exists:
            repository.delete()

    updated_description = "edited_{}".format(fauxfactory.gen_alpha())
    with update(repository):
        repository.description = updated_description
    view = navigate_to(repository, "Edit")
    wait_for(lambda: view.description.value != "", delay=1, timeout=5)
    assert view.description.value == updated_description
    repository.delete()
def test_embedded_ansible_repository_crud(request, wait_for_ansible):
    repositories = RepositoryCollection()
    repository = repositories.create(
        fauxfactory.gen_alpha(),
        "https://github.com/quarckster/ansible_playbooks",
        description=fauxfactory.gen_alpha()
    )

    @request.addfinalizer
    def _delete_if_exists():
        if repository.exists:
            repository.delete()

    updated_description = "edited_{}".format(fauxfactory.gen_alpha())
    with update(repository):
        repository.description = updated_description
    view = navigate_to(repository, "Edit")
    wait_for(lambda: view.description.value != "", delay=1, timeout=5)
    assert view.description.value == updated_description
    repository.delete()
Пример #8
0
def test_embedded_ansible_repository_crud(request, appliance):
    appliance.wait_for_embedded_ansible()
    repositories = RepositoryCollection()
    repository = repositories.create(
        fauxfactory.gen_alpha(),
        "https://github.com/quarckster/ansible_playbooks",
        description=fauxfactory.gen_alpha())

    @request.addfinalizer
    def _delete_if_exists():
        if repository.exists:
            repository.delete()

    updated_description = "edited_{}".format(fauxfactory.gen_alpha())
    with update(repository):
        repository.description = updated_description
    view = navigate_to(repository, "Edit")
    wait_for(lambda: view.description.value != "", delay=1, timeout=5)
    assert view.description.value == updated_description
    repository.delete()