2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 20:17:55 +00:00

test(genesis): cover final consumer gaps

This commit is contained in:
Vinícius Ferrão
2026-08-24 21:46:59 -03:00
parent f5d1bd8e73
commit d43bda0005
2 changed files with 42 additions and 2 deletions
@@ -86,6 +86,11 @@ like(
);
my $go_xcat = read_file('xCAT-server/share/xcat/tools/go-xcat');
unlike(
$go_xcat,
qr/GO_XCAT_LIBRARY_ONLY/,
'go-xcat cannot be disabled by an inherited test environment variable',
);
for my $architecture (qw(x86 x86_64 ppc64 ppc64le armv7hf aarch64 riscv64)) {
like(
$go_xcat,
@@ -100,4 +105,33 @@ for my $architecture (qw(x86 x86_64 ppc64 ppc64le armv7hf aarch64 riscv64)) {
);
}
my $mknb_pod = read_file('xCAT-client/pods/man8/mknb.8.pod');
like(
$mknb_pod,
qr{/opt/xcat/share/xcat/netboot/genesis-openembedded/ARCH},
'the mknb man page documents the OpenEmbedded install namespace',
);
like(
$mknb_pod,
qr/x86.*x86_64.*ppc64.*ppc64le.*armv7hf.*aarch64.*riscv64/s,
'the mknb man page lists every exact OpenEmbedded architecture',
);
unlike(
$mknb_pod,
qr/For ppc64le, use the ppc64 architecture/,
'the mknb man page no longer presents ppc64 as the ppc64le name',
);
my $offline_guide = read_file('docs/source/guides/install-guides/common_sections.rst');
like(
$offline_guide,
qr/reposync.*--repoid=xcat-dep-common.*--download-metadata/s,
'the offline guide explains how to mirror the common repository',
);
like(
$offline_guide,
qr/if .*common.*is not.*archive/is,
'the offline guide does not assume that every archive contains common',
);
done_testing();
+8 -2
View File
@@ -16,8 +16,14 @@ print {$driver_fh} <<'DRIVER';
#!/bin/bash
set -euo pipefail
export GO_XCAT_LIBRARY_ONLY=1
source "$GO_XCAT_SOURCE"
function_body=$(
awk '
/^function add_xcat_dep_common_repo_yum_or_zypper\(\)/ { copy = 1 }
copy { print }
copy && /^}$/ { exit }
' "$GO_XCAT_SOURCE"
)
eval "$function_body"
TMP_DIR=$TEST_TMP
GO_XCAT_DEFAULT_BASE_URL=https://repo.example.invalid