Skip to content

Commit

Permalink
Rework a few assertions to be smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Aug 1, 2024
1 parent 17febde commit d05b8c6
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions tests/foreman/api/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,14 +645,18 @@ def test_podman_push(self, module_target_sat, module_product, module_org, enable
"""
SMALL_REPO_NAME = 'arianna'
LARGE_REPO_NAME = 'fedora'
result = module_target_sat.execute(
f'podman pull registry.fedoraproject.org/{SMALL_REPO_NAME}'
assert (
module_target_sat.execute(
f'podman pull registry.fedoraproject.org/{SMALL_REPO_NAME}'
).status
== 0
)
assert result.status == 0
result = module_target_sat.execute(
f'podman pull registry.fedoraproject.org/{LARGE_REPO_NAME}'
assert (
module_target_sat.execute(
f'podman pull registry.fedoraproject.org/{LARGE_REPO_NAME}'
).status
== 0
)
assert result.status == 0
small_image_id = module_target_sat.execute(f'podman images {SMALL_REPO_NAME} -q')
assert small_image_id
large_image_id = module_target_sat.execute(f'podman images {LARGE_REPO_NAME} -q')
Expand Down Expand Up @@ -702,8 +706,10 @@ def test_cv_podman(
:CaseImportance: High
"""
REPO_NAME = 'fedora'
result = module_target_sat.execute(f'podman pull registry.fedoraproject.org/{REPO_NAME}')
assert result.status == 0
assert (
module_target_sat.execute(f'podman pull registry.fedoraproject.org/{REPO_NAME}').status
== 0
)
large_image_id = module_target_sat.execute(f'podman images {REPO_NAME} -q')
assert large_image_id
large_repo_cmd = f'{(module_org.label)}/{(module_product.label)}/{REPO_NAME}'.lower()
Expand Down

0 comments on commit d05b8c6

Please sign in to comment.