File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cookbooks/aws-parallelcluster-environment/test/controls Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2020
2121 describe 'Check the presence of the cloudwatch package gpg key'
2222 # In Ubuntu >20.04 due to environment variable the keyring is placed under home of the user ubuntu with the permission of root
23-
24- keyring = os_properties . ubuntu? && !os_properties . on_docker? ? '--keyring /home/ubuntu/.gnupg/pubring.kbx' : ''
23+ is_ubuntu = os_properties . ubuntu?
24+ keyring = is_ubuntu && !os_properties . on_docker? ? '--keyring /home/ubuntu/.gnupg/pubring.kbx' : ''
2525 sudo = os_properties . redhat_on_docker? ? '' : 'sudo'
2626 describe bash ( "#{ sudo } gpg --list-keys #{ keyring } " ) do
2727 # Don't check exit status for Ubuntu20 because it returns 2 when executed in the validate phase of a created AMI
2828 # os_properties cannot be used in the describe block level. It can be used within an it{} block
29- its ( 'exit_status' ) { should eq 0 } unless os_properties . ubuntu?
29+ its ( 'exit_status' ) { should eq 0 } unless is_ubuntu
3030 its ( 'stdout' ) { should match /3B789C72/ }
3131 its ( 'stdout' ) { should match /Amazon CloudWatch Agent/ }
3232 end
You can’t perform that action at this time.
0 commit comments