File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 11require 'spec_helper_acceptance'
22
33describe '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+
417 before ( :context ) { purge_foreman_proxy }
518
619 context 'without params' do
2336 end
2437
2538 %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
2942 ] . each do |f |
30- describe file ( f ) do
43+ describe file ( File . join ( root , f ) ) do
3144 it { is_expected . to be_file }
3245 it { is_expected . to be_owned_by 'foreman-proxy' }
3346 it { is_expected . to be_grouped_into 'foreman-proxy' }
3447 it { is_expected . to be_mode '644' }
3548 end
3649 end
3750
38- describe file ( '/var/lib/tftpboot/ boot/fdi-image') do
51+ describe file ( File . join ( root , '/ boot/fdi-image') ) do
3952 it { is_expected . to be_directory }
4053 it { is_expected . to be_owned_by 'foreman-proxy' }
4154 it { is_expected . to be_grouped_into 'foreman-proxy' }
You can’t perform that action at this time.
0 commit comments