2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-20 14:45:41 +00:00

fix(xcat-core): postscript_heredoc_embedding.t passes when the file it reads is missing

postscript_heredoc_embedding.t called plan skip_all when xCAT-server/share/xcat/install/scripts was absent, so a checkout that lost
the file reported 0 tests and exit 0. A test that cannot fail measures nothing.

Die instead, which is what makentp_ntp_deps.t already does for setupntp.

With xCAT-server/share/xcat/install/scripts moved aside the file now exits 2 and prints "<scriptdir> not found";
before this change it exited 0 and printed "1..0 # SKIP <scriptdir> not found". With the file
present the test passes either way.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit fdc96de015)
This commit is contained in:
Daniel Hilst
2026-09-15 21:11:14 -03:00
committed by github-actions[bot]
parent 181050ea43
commit 40fec5d397
@@ -18,7 +18,7 @@ use Test::More;
my $root = "$FindBin::Bin/../..";
my $scriptdir = "$root/xCAT-server/share/xcat/install/scripts";
plan skip_all => "$scriptdir not found" unless -d $scriptdir;
die "$scriptdir not found\n" unless -d $scriptdir;
# Return every (post script, delimiter, embedded file) the install scripts declare.
sub embeddings {