|
3 | 3 | describe 'Scenario: install foreman-proxy with discovery plugin' do
|
4 | 4 | before(:context) { purge_foreman_proxy }
|
5 | 5 |
|
6 |
| - include_examples 'the example', 'discovery.pp' |
| 6 | + context 'without params' do |
| 7 | + include_examples 'the example', 'discovery.pp' |
7 | 8 |
|
8 |
| - it_behaves_like 'the default foreman proxy application' |
| 9 | + it_behaves_like 'the default foreman proxy application' |
9 | 10 |
|
10 |
| - describe command('curl -sk https://127.0.0.1:8443/features | grep -q discovery') do |
11 |
| - its(:exit_status) { should eq 0 } |
| 11 | + describe command('curl -sk https://127.0.0.1:8443/features | grep -q discovery') do |
| 12 | + its(:exit_status) { should eq 0 } |
| 13 | + end |
| 14 | + end |
| 15 | + |
| 16 | + context 'with install_images param' do |
| 17 | + include_examples 'the example', 'discovery_images.pp' |
| 18 | + |
| 19 | + it_behaves_like 'the default foreman proxy application' |
| 20 | + |
| 21 | + describe command('curl -sk https://127.0.0.1:8443/features | grep -q discovery') do |
| 22 | + its(:exit_status) { should eq 0 } |
| 23 | + end |
| 24 | + |
| 25 | + %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 |
| 29 | + ].each do |f| |
| 30 | + describe file(f) do |
| 31 | + it { is_expected.to be_file } |
| 32 | + it { is_expected.to be_owned_by 'foreman-proxy' } |
| 33 | + it { is_expected.to be_grouped_into 'foreman-proxy' } |
| 34 | + it { is_expected.to be_mode '644' } |
| 35 | + end |
| 36 | + end |
| 37 | + |
| 38 | + describe file('/var/lib/tftpboot/boot/fdi-image') do |
| 39 | + it { is_expected.to be_directory } |
| 40 | + it { is_expected.to be_owned_by 'foreman-proxy' } |
| 41 | + it { is_expected.to be_grouped_into 'foreman-proxy' } |
| 42 | + it { is_expected.to be_mode '755' } |
| 43 | + end |
12 | 44 | end
|
13 | 45 | end
|
0 commit comments