Skip to content

Commit ee13da7

Browse files
committed
(TESTING) debian tftp path
1 parent 27f7197 commit ee13da7

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

spec/acceptance/discovery_spec.rb

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
require 'spec_helper_acceptance'
22

33
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+
417
before(:context) { purge_foreman_proxy }
518

619
context 'without params' do
@@ -23,19 +36,19 @@
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' }

0 commit comments

Comments
 (0)