Skip to content

Commit 2aaa251

Browse files
committed
test: add (failing) regression test for issue#655
This adds another layer of defense for issue#655, i.e. have a hand craftet toml that integration tests with bib as a smoke test.
1 parent 0b966e4 commit 2aaa251

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/test_manifest.py

+30
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,36 @@ def test_manifest_fs_customizations(tmp_path, build_container, fscustomizations,
430430
assert_fs_customizations(fscustomizations, rootfs, output)
431431

432432

433+
def test_manifest_fs_customizations_smoke_toml(tmp_path, build_container):
434+
container_ref = "quay.io/centos-bootc/centos-bootc:stream9"
435+
rootfs = "xfs"
436+
437+
expected_fs_customizations = {
438+
"/": 10 * 1024 * 1024 * 1024,
439+
"/var/data": 20 * 1024 * 1024 * 1024,
440+
}
441+
442+
config_toml_path = tmp_path / "config.toml"
443+
config_toml_path.write_text(textwrap.dedent("""\
444+
[[customizations.filesystem]]
445+
mountpoint = "/"
446+
minsize = "10 GiB"
447+
448+
[[customizations.filesystem]]
449+
mountpoint = "/var/data"
450+
minsize = "20 GiB"
451+
"""))
452+
output = subprocess.check_output([
453+
*testutil.podman_run_common,
454+
"-v", f"{config_toml_path}:/config.toml:ro",
455+
"--entrypoint=/usr/bin/bootc-image-builder",
456+
build_container,
457+
f"--rootfs={rootfs}",
458+
"manifest", f"{container_ref}",
459+
])
460+
assert_fs_customizations(expected_fs_customizations, rootfs, output)
461+
462+
433463
def assert_fs_customizations(customizations, fstype, manifest):
434464
# use the fstab stage to get filesystem types for each mountpoint
435465
fstab_stage = find_fstab_stage_from(manifest)

0 commit comments

Comments
 (0)