File tree Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Original file line number Diff line number Diff line change
1
+ require 'spec_helper_acceptance'
2
+
3
+ describe 'check collect with default values' do
4
+ context 'check if service files are created' do
5
+ it 'service files are created' do
6
+ files = run_shell ( 'ls /etc/systemd/system/pe_databases-*.service' ) . stdout
7
+ expect ( files . split ( "\n " ) . count ) . to be >=3
8
+ end
9
+ it 'service timer files are created' do
10
+ files = run_shell ( 'ls /etc/systemd/system/pe_databases-*.timer' ) . stdout
11
+ expect ( files . split ( "\n " ) . count ) . to be >=3
12
+ end
13
+ end
14
+ end
Original file line number Diff line number Diff line change 13
13
end
14
14
15
15
describe 'check pe_databases script directory' do
16
- it 'scripts folder exists' do
17
- file ( '/opt/puppetlabs/pe_databases/scripts' ) . should be_directory
18
- end
16
+ it 'scripts folder exists' do
17
+ file ( '/opt/puppetlabs/pe_databases/scripts' ) . should be_directory
18
+ end
19
+ end
20
+ describe 'check systemd fact' do
21
+ it 'is true on all supported OS' do
22
+ expect ( host_inventory [ 'facter' ] [ 'pe_databases' ] [ 'have_systemd' ] ) . to eq true
23
+ end
19
24
end
20
25
end
Original file line number Diff line number Diff line change @@ -9,11 +9,15 @@ class LitmusHelper
9
9
include PuppetLitmus
10
10
end
11
11
12
- pp = <<-MANIFEST
13
- package { 'crontab':
12
+ RSpec . configure do |c |
13
+ c . before :suite do
14
+ pp = <<-MANIFEST
15
+ package { 'cron':
14
16
ensure => installed,
15
- name => 'crontab '
17
+ name => 'cron '
16
18
}
17
19
MANIFEST
18
20
19
- LitmusHelper . instance . apply_manifest ( pp )
21
+ LitmusHelper . instance . apply_manifest ( pp )
22
+ end
23
+ end
You can’t perform that action at this time.
0 commit comments