Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added wait for tasks for repo creation #17171

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions tests/foreman/api/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ def _create_repository(module_target_sat, product, name=None, upstream_name=None
@pytest.fixture
def repo(module_product, module_target_sat):
"""Create a single repository."""
return _create_repository(module_target_sat, module_product)
repo = _create_repository(module_target_sat, module_product)
module_target_sat.wait_for_tasks(
search_query='Actions::Katello::Repository::MetadataGenerate'
f' and resource_id = {repo.id}'
' and resource_type = Katello::Repository',
max_tries=6,
search_rate=10,
)
return repo


@pytest.fixture
Expand Down Expand Up @@ -537,8 +545,8 @@ def test_positive_remove_docker_repo_cv(
content_view=content_view, environment=module_lce, organization=module_org
).create()
assert ak.content_view.id == content_view.id
ak.content_view = None
assert ak.update(['content_view']).content_view is None
ak.content_view_environments = None
assert ak.update(['content_view_environments']).content_view is None

@pytest.mark.tier2
def test_positive_add_docker_repo_ccv(
Expand Down Expand Up @@ -602,8 +610,8 @@ def test_positive_remove_docker_repo_ccv(
content_view=comp_content_view, environment=module_lce, organization=module_org
).create()
assert ak.content_view.id == comp_content_view.id
ak.content_view = None
assert ak.update(['content_view']).content_view is None
ak.content_view_environments = None
assert ak.update(['content_view_environments']).content_view is None


class TestPodman:
Expand Down
Loading