Skip to content

Commit

Permalink
added wait for tasks for repo creation
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant committed Dec 13, 2024
1 parent 8c12788 commit 07aea1b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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

0 comments on commit 07aea1b

Please sign in to comment.