Skip to content

Commit ce3f680

Browse files
committed
Change acceptance tests
1 parent 227c88f commit ce3f680

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

spec/acceptance/pe_system_spec.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@
4949
context 'system timers are running' do
5050
it { expect(service('puppet_system_cpu-metrics.timer')).to be_running }
5151
it { expect(service('puppet_system_cpu-tidy.timer')).to be_running }
52-
it { expect(service('puppet_system_memory-metrics.timer')).to be_running }
53-
it { expect(service('puppet_system_memory-tidy.timer')).to be_running }
5452
it { expect(service('puppet_system_processes-metrics.timer')).to be_running }
5553
it { expect(service('puppet_system_processes-tidy.timer')).to be_running }
5654
end
5755

5856
it 'creates system tidy services files' do
59-
files = run_shell('ls /etc/systemd/system/puppet_system*-tidy.service').stdout
60-
expect(files.split("\n").count).to eq(3)
57+
expect(run_shell('ls /etc/systemd/system/puppet_system_cpu-tidy.service').exit_code).to eq(0)
58+
expect(run_shell('ls /etc/systemd/system/puppet_system_processes-tidy.service').exit_code).to eq(0)
6159
end
6260
end
6361

@@ -79,15 +77,13 @@ class { 'puppet_metrics_collector::system':
7977
context 'system timers are running' do
8078
it { expect(service('puppet_system_cpu-metrics.timer')).to be_running }
8179
it { expect(service('puppet_system_cpu-tidy.timer')).to be_running }
82-
it { expect(service('puppet_system_memory-metrics.timer')).to be_running }
83-
it { expect(service('puppet_system_memory-tidy.timer')).to be_running }
8480
it { expect(service('puppet_system_processes-metrics.timer')).to be_running }
8581
it { expect(service('puppet_system_processes-tidy.timer')).to be_running }
8682
end
8783

8884
it 'creates system tidy services files' do
89-
files = run_shell('ls /etc/systemd/system/puppet_system*-tidy.service').stdout
90-
expect(files.split("\n").count).to eq(3)
85+
expect(run_shell('ls /etc/systemd/system/puppet_system_cpu-tidy.service').exit_code).to eq(0)
86+
expect(run_shell('ls /etc/systemd/system/puppet_system_processes-tidy.service').exit_code).to eq(0)
9187
end
9288
end
9389
end

0 commit comments

Comments
 (0)