File tree 1 file changed +18
-5
lines changed
1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 1
1
require 'spec_helper_acceptance'
2
2
3
3
describe 'Scenario: install foreman-proxy with discovery plugin' do
4
+ root = case host_inventory [ 'facter' ] [ 'os' ] [ 'name' ]
5
+ when 'Debian'
6
+ '/srv/tftp'
7
+ when 'Ubuntu'
8
+ if host_inventory [ 'facter' ] [ 'os' ] [ 'release' ] [ 'major' ] . to_f >= 20.04
9
+ '/srv/tftp'
10
+ else
11
+ '/var/lib/tftpboot'
12
+ end
13
+ else
14
+ '/var/lib/tftpboot'
15
+ end
16
+
4
17
before ( :context ) { purge_foreman_proxy }
5
18
6
19
context 'without params' do
23
36
end
24
37
25
38
%w[
26
- /var/lib/tftpboot/ boot/fdi-image-latest.tar
27
- /var/lib/tftpboot/ boot/fdi-image/initrd0.img
28
- /var/lib/tftpboot/ boot/fdi-image/vmlinuz0
39
+ /boot/fdi-image-latest.tar
40
+ /boot/fdi-image/initrd0.img
41
+ /boot/fdi-image/vmlinuz0
29
42
] . each do |f |
30
- describe file ( f ) do
43
+ describe file ( File . join ( root , f ) ) do
31
44
it { is_expected . to be_file }
32
45
it { is_expected . to be_owned_by 'foreman-proxy' }
33
46
it { is_expected . to be_grouped_into 'foreman-proxy' }
34
47
it { is_expected . to be_mode '644' }
35
48
end
36
49
end
37
50
38
- describe file ( '/var/lib/tftpboot/ boot/fdi-image') do
51
+ describe file ( File . join ( root , '/ boot/fdi-image') ) do
39
52
it { is_expected . to be_directory }
40
53
it { is_expected . to be_owned_by 'foreman-proxy' }
41
54
it { is_expected . to be_grouped_into 'foreman-proxy' }
You can’t perform that action at this time.
0 commit comments