Skip to content

Commit 4b66805

Browse files
Fix github system test on Ubuntu22 and 24
1 parent 97e1612 commit 4b66805

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

cookbooks/aws-parallelcluster-environment/resources/cloudwatch/partial/_cloudwatch_install_package_debian.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
action :cloudwatch_install_package do
22
dpkg_package package_path do
33
source package_path
4-
end
4+
end unless on_docker?
55
end
66

77
action_class do

cookbooks/aws-parallelcluster-environment/test/controls/cloudwatch_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
title "Check if cloudwatch package is installed"
3737
describe package('amazon-cloudwatch-agent') do
3838
it { should be_installed }
39-
end
39+
end unless os_properties.ubuntu_on_docker?
4040
end
4141

4242
control 'tag:config_cloudwatch_configured' do

cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def ubuntu?
3636
inspec.os.name == 'ubuntu'
3737
end
3838

39+
def ubuntu_on_docker?
40+
on_docker? && ubuntu?
41+
end
42+
3943
def redhat8?
4044
redhat? && inspec.os.release.to_i == 8
4145
end

0 commit comments

Comments
 (0)