Skip to content

Commit

Permalink
test: run the centos-9 test with an attached terminal
Browse files Browse the repository at this point in the history
This commit changes the centos-9 test to run with `podman -t` so
that we have a test-case that uses the `terminal` progress. This
is prompted by:
a) we have no integration test currently that uses the terminal
   progress for the full build
b) a konflux failure/memory leak that showed because there the
   test is run with `-t`
  • Loading branch information
mvo5 committed Feb 7, 2025
1 parent 90355b9 commit d6d6720
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload, gpg_
"-v", "/var/tmp/osbuild-test-store:/store", # share the cache between builds
"-v", "/var/lib/containers/storage:/var/lib/containers/storage", # mount the host's containers storage
]
if tc.podman_terminal:
cmd.append("-t")

if tc.sign:
sign_container_image(gpg_conf, registry_conf, tc.container_ref)
Expand All @@ -430,6 +432,8 @@ def build_images(shared_tmpdir, build_container, request, force_aws_upload, gpg_
f"--use-librepo={tc.use_librepo}",
*tc.bib_rootfs_args()
])
if tc.podman_terminal:
cmd.append("--progress=term")

# print the build command for easier tracing
print(" ".join(cmd))
Expand Down
3 changes: 3 additions & 0 deletions test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class TestCase:
disk_config: str = ""
# use librepo for the downloading
use_librepo: bool = False
# podman_terminal enables the podman -t option to get progress
podman_terminal: bool = False

def bib_rootfs_args(self):
if self.rootfs:
Expand Down Expand Up @@ -61,6 +63,7 @@ class TestCaseC9S(TestCase):
"BIB_TEST_BOOTC_CONTAINER_TAG",
"quay.io/centos-bootc/centos-bootc:stream9")
use_librepo: bool = True
podman_terminal: bool = True


@dataclasses.dataclass
Expand Down

0 comments on commit d6d6720

Please sign in to comment.