From bdb32554ff12ce7e5ad154c9ed628afbbba13f3e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Jan 2025 08:31:09 +0100 Subject: [PATCH] test: add new `test_container_builds_image_librepo` test This commit adds a (smoke) integration test for librepo based manifests. It needs a flanking test that also ensures that --use-librepo really generates librepo sources. --- test/test_container.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_container.py b/test/test_container.py index f769c7b..bf59cef 100644 --- a/test/test_container.py +++ b/test/test_container.py @@ -4,8 +4,9 @@ import subprocess import pytest +@pytest.mark.parametrize("use_librepo", [False, True]) @pytest.mark.skipif(os.getuid() != 0, reason="needs root") -def test_container_builds_image(tmp_path, build_container): +def test_container_builds_image(tmp_path, build_container, use_librepo): output_dir = tmp_path / "output" output_dir.mkdir() subprocess.check_call([ @@ -15,7 +16,8 @@ def test_container_builds_image(tmp_path, build_container): build_container, "build", "minimal-raw", - "--distro", "centos-9" + "--distro", "centos-9", + f"--use-librepo={use_librepo}", ]) arch = "x86_64" assert (output_dir / f"centos-9-minimal-raw-{arch}/xz/disk.raw.xz").exists()