mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-12-03 23:57:06 +00:00
test(service-node): a check matches the path of the checkout it runs in
service_node_artifacts_el.t asserts the EL service template is not a Subiquity one, and it matched the pattern against the whole absolute path. A checkout directory named for the thing under test therefore matched itself: in a worktree called ipv6-subiquity-net the check failed on share/xcat/install/rh/service.rhels9.tmpl, which is the right template. It now matches the basename. A real Subiquity template still fails it, and an EL one in a path carrying the word still passes. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -113,7 +113,10 @@ my $tmpl = xCAT::SvrUtils::get_tmpl_file_name($SHARE . '/rh', $SN{profile}, $SN{
|
||||
ok(defined $tmpl && length $tmpl, 'the EL service profile resolves a template at all')
|
||||
or diag('no template for ' . join(' ', @SN{qw(profile osver arch)}));
|
||||
like($tmpl, qr{/service[^/]*\.tmpl$}, '... and it is the service profile, not compute');
|
||||
unlike($tmpl, qr{subiquity}, '... and not a Subiquity template, which no EL node can boot');
|
||||
# The basename, not the whole path: the path carries the checkout directory, and a checkout
|
||||
# named for the thing under test made this match itself.
|
||||
unlike(( $tmpl =~ m{([^/]+)$} )[0] // $tmpl, qr{subiquity},
|
||||
'... and not a Subiquity template, which no EL node can boot');
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 3. The NFS export. A service node with nfsserver=1 serves files. With site.installloc set it
|
||||
|
||||
Reference in New Issue
Block a user