Skip to content

Commit a490d2b

Browse files
himani2411Himani Anil Deshpande
andcommitted
[Kitchen test] Add Ubuntu Os for C_state Install phase tests (aws#2916)
Co-authored-by: Himani Anil Deshpande <[email protected]>
1 parent 11e8def commit a490d2b

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

cookbooks/aws-parallelcluster-platform/test/controls/c_states_spec.rb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
title 'Check the configuration to disable c states'
44
only_if { !os_properties.on_docker? && os_properties.x86? }
55

6-
if os_properties.ubuntu2004?
7-
describe file('/etc/default/grub') do
8-
it { should exist }
9-
its('content') { should match(/processor.max_cstate=1/) }
10-
its('content') { should match(/intel_idle.max_cstate=1/) }
11-
end
12-
describe file('/boot/grub/grub.cfg') do
13-
it { should exist }
14-
its('content') { should match(/processor.max_cstate=1/) }
15-
its('content') { should match(/intel_idle.max_cstate=1/) }
6+
if os_properties.ubuntu?
7+
%w(/etc/default/grub /boot/grub/grub.cfg).each do |file_path|
8+
describe file(file_path) do
9+
it { should exist }
10+
its('content') { should match(/processor.max_cstate=1/) }
11+
its('content') { should match(/intel_idle.max_cstate=1/) }
12+
end
1613
end
1714
else
1815
describe bash('cpupower idle-info') do

0 commit comments

Comments
 (0)