Skip to content

Commit 015903b

Browse files
committed
tests: Use native architecture in preflight disk check test
This should fix the aarch64 testing farm jobs; they weren't gating so we didn't notice when this check was was introduced. Assisted-by: OpenCode (Claude Opus) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 0ca2227 commit 015903b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tmt/tests/booted/test-upgrade-preflight-disk-check.nu

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ def main [] {
2323
# parse ImageConfiguration). The layer blob need not exist because
2424
# the disk-space check fires before any layer is fetched.
2525

26+
# Map the system architecture to OCI image spec naming
27+
let oci_arch = match (uname | get machine) {
28+
"x86_64" => "amd64",
29+
"aarch64" => "arm64",
30+
$other => $other, # s390x, ppc64le, etc. match as-is
31+
}
32+
2633
# Minimal OCI image config (empty rootfs, no layers referenced inside config)
2734
# The config must include a bootable label ("containers.bootc" or "ostree.bootable")
2835
# so that bootc's require_bootable() check in prepare() passes.
29-
let config_content = '{"architecture":"amd64","os":"linux","config":{"Labels":{"containers.bootc":"1"}},"rootfs":{"type":"layers","diff_ids":[]},"history":[{"created_by":"fake layer"}]}'
36+
let config_content = $'{"architecture":"($oci_arch)","os":"linux","config":{"Labels":{"containers.bootc":"1"}},"rootfs":{"type":"layers","diff_ids":[]},"history":[{"created_by":"fake layer"}]}'
3037
let config_digest = $config_content | hash sha256
3138
let config_size = ($config_content | str length)
3239

0 commit comments

Comments
 (0)