Skip to content

Commit

Permalink
test: add new test_container_builds_image_librepo test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mvo5 committed Jan 17, 2025
1 parent 27c712d commit 67b511a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
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([
Expand All @@ -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()
Expand Down

0 comments on commit 67b511a

Please sign in to comment.