Skip to content

Commit

Permalink
update repo_options fixture-create a product if not exist (#10482)
Browse files Browse the repository at this point in the history
* use existing fixture repo_options_custom_product,so next consicative test function will not affect

* increase default timeout for Repository > sync
  • Loading branch information
vijaysawant committed Jan 24, 2023
1 parent da81106 commit f038062
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/foreman/api/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ def test_positive_cancel_docker_repo_sync(self, repo):

@pytest.mark.tier2
@pytest.mark.parametrize(
'repo_options',
'repo_options_custom_product',
**datafactory.parametrized(
{
constants.CONTAINER_UPSTREAM_NAME: {
Expand All @@ -1508,7 +1508,7 @@ def test_positive_cancel_docker_repo_sync(self, repo):
),
indirect=True,
)
def test_positive_delete_product_with_synced_repo(self, repo, repo_options_custom_product):
def test_positive_delete_product_with_synced_repo(self, repo_options_custom_product):
"""Create and sync a Docker-type repository, delete the product.
:id: c3d33836-54df-484d-97e1-f9fc9e22d23c
Expand All @@ -1523,7 +1523,8 @@ def test_positive_delete_product_with_synced_repo(self, repo, repo_options_custo
:BZ: 1867287
"""
repo.sync()
repo = entities.Repository(**repo_options_custom_product).create()
repo.sync(timeout=600)
assert repo.read().content_counts['docker_manifest'] >= 1
assert repo.product.delete()

Expand Down

0 comments on commit f038062

Please sign in to comment.