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.
This commit is contained in:
parent
687f69bb76
commit
bdb32554ff
1 changed files with 4 additions and 2 deletions
|
|
@ -4,8 +4,9 @@ import subprocess
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("use_librepo", [False, True])
|
||||||
@pytest.mark.skipif(os.getuid() != 0, reason="needs root")
|
@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 = tmp_path / "output"
|
||||||
output_dir.mkdir()
|
output_dir.mkdir()
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
|
|
@ -15,7 +16,8 @@ def test_container_builds_image(tmp_path, build_container):
|
||||||
build_container,
|
build_container,
|
||||||
"build",
|
"build",
|
||||||
"minimal-raw",
|
"minimal-raw",
|
||||||
"--distro", "centos-9"
|
"--distro", "centos-9",
|
||||||
|
f"--use-librepo={use_librepo}",
|
||||||
])
|
])
|
||||||
arch = "x86_64"
|
arch = "x86_64"
|
||||||
assert (output_dir / f"centos-9-minimal-raw-{arch}/xz/disk.raw.xz").exists()
|
assert (output_dir / f"centos-9-minimal-raw-{arch}/xz/disk.raw.xz").exists()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue