From de8f81d6749bc0fa47d62fa59f1568c47d5e804f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sun, 9 Aug 2026 13:09:54 -0300 Subject: [PATCH] test(ci): check dependency install --- .../unit/github_action_noninteractive_install.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-test/unit/github_action_noninteractive_install.t b/xCAT-test/unit/github_action_noninteractive_install.t index d5ebc68f4..f3f4b6ed4 100644 --- a/xCAT-test/unit/github_action_noninteractive_install.t +++ b/xCAT-test/unit/github_action_noninteractive_install.t @@ -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();