Skip to content

Commit

Permalink
(TESTING) debian tftp path
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Aug 9, 2022
1 parent 27f7197 commit ee13da7
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions spec/acceptance/discovery_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
require 'spec_helper_acceptance'

describe 'Scenario: install foreman-proxy with discovery plugin' do
root = case host_inventory['facter']['os']['name']
when 'Debian'
'/srv/tftp'
when 'Ubuntu'
if host_inventory['facter']['os']['release']['major'].to_f >= 20.04
'/srv/tftp'
else
'/var/lib/tftpboot'
end
else
'/var/lib/tftpboot'
end

before(:context) { purge_foreman_proxy }

context 'without params' do
Expand All @@ -23,19 +36,19 @@
end

%w[
/var/lib/tftpboot/boot/fdi-image-latest.tar
/var/lib/tftpboot/boot/fdi-image/initrd0.img
/var/lib/tftpboot/boot/fdi-image/vmlinuz0
/boot/fdi-image-latest.tar
/boot/fdi-image/initrd0.img
/boot/fdi-image/vmlinuz0
].each do |f|
describe file(f) do
describe file(File.join(root, f)) do
it { is_expected.to be_file }
it { is_expected.to be_owned_by 'foreman-proxy' }
it { is_expected.to be_grouped_into 'foreman-proxy' }
it { is_expected.to be_mode '644' }
end
end

describe file('/var/lib/tftpboot/boot/fdi-image') do
describe file(File.join(root, '/boot/fdi-image')) do
it { is_expected.to be_directory }
it { is_expected.to be_owned_by 'foreman-proxy' }
it { is_expected.to be_grouped_into 'foreman-proxy' }
Expand Down

0 comments on commit ee13da7

Please sign in to comment.