This commit moves the smoke test from fedora-41 to centos-9. The reason is that it seems the fedora mirrors in general are a bit more flaky so /hopefully/ the centos one will help. The real fix of course is to retry different mirrors on failure, we will need to look into librepo integration in osbuild (again) for this (hopefully soon!).
27 lines
746 B
Python
27 lines
746 B
Python
import os
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
from containerbuild import build_container_fixture
|
|
|
|
|
|
@pytest.mark.skipif(os.getuid() != 0, reason="needs root")
|
|
def test_container_builds_image(tmp_path, build_container):
|
|
output_dir = tmp_path / "output"
|
|
output_dir.mkdir()
|
|
subprocess.check_call([
|
|
"podman", "run",
|
|
"--privileged",
|
|
"-v", f"{output_dir}:/output",
|
|
build_container,
|
|
"build",
|
|
"minimal-raw",
|
|
"--distro", "centos-9"
|
|
])
|
|
arch = "x86_64"
|
|
assert (output_dir / f"fedora-41-minimal-raw-{arch}/xz/disk.raw.xz").exists()
|
|
# XXX: ensure no other leftover dirs
|
|
dents = os.listdir(output_dir)
|
|
assert len(dents) == 1, f"too many dentries in output dir: {dents}"
|
|
|