2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-28 17:46:40 +00:00

test(ci): check dependency install

This commit is contained in:
Vinícius Ferrão
2026-08-09 13:09:54 -03:00
parent 1ae5998f01
commit de8f81d674
@@ -13,6 +13,14 @@ open( my $fh, '<', $script ) or die "Unable to read $script: $!";
my $contents = do { local $/; <$fh> };
close($fh);
my $workflow = File::Spec->catfile(
$FindBin::Bin, '..', '..', '.github', 'workflows', 'xcat_test.yml'
);
open( my $workflow_fh, '<', $workflow )
or die "Unable to read $workflow: $!";
my $workflow_contents = do { local $/; <$workflow_fh> };
close($workflow_fh);
for my $package (qw(xcat xcat-probe xcat-test)) {
like(
$contents,
@@ -24,4 +32,10 @@ for my $package (qw(xcat xcat-probe xcat-test)) {
unlike( $contents, qr{yes\s*\|\s*(?:sudo\s+)?apt-get},
'package input is not piped into maintainer scripts' );
like(
$workflow_contents,
qr{sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y\b},
'workflow dependency installation is noninteractive'
);
done_testing();