|
2 | 2 |
|
3 | 3 | require 'spec_helper' |
4 | 4 |
|
5 | | -describe 'test1.dev.lsst.org' do |
6 | | - describe 'auxtel-archiver role' do |
7 | | - lsst_sites.each do |site| |
8 | | - context "with site #{site}", :site, :common do |
9 | | - let(:node_params) do |
10 | | - { |
11 | | - site: site, |
12 | | - role: 'auxtel-archiver', |
13 | | - } |
14 | | - end |
15 | | - |
16 | | - it { is_expected.to compile.with_all_deps } |
17 | | - |
18 | | - include_examples 'lhn sysctls' |
19 | | - include_examples 'archiver' |
20 | | - |
21 | | - it { is_expected.to contain_file('/data/repo/LATISS') } |
22 | | - |
23 | | - it { is_expected.to contain_rabbitmq_vhost('/test_at') } |
24 | | - it { is_expected.to contain_rabbitmq_user_permissions('iip@/test_at') } |
25 | | - it { is_expected.to contain_rabbitmq_user_permissions('guest@/test_at') } |
26 | | - it { is_expected.to contain_rabbitmq_exchange('message@/test_at') } |
27 | | - |
28 | | - %w[ |
29 | | - f98_consume@/test_at |
30 | | - f99_consume@/test_at |
31 | | - at_foreman_ack_publish@/test_at |
32 | | - at_publish_to_oods@/test_at |
33 | | - oods_publish_to_at@/test_at |
34 | | - archive_ctrl_publish@/test_at |
35 | | - archive_ctrl_consume@/test_at |
36 | | - telemetry_queue@/test_at |
37 | | - ].each do |q| |
38 | | - it { is_expected.to contain_rabbitmq_queue(q) } |
39 | | - it { is_expected.to contain_rabbitmq_binding("message@#{q}") } |
40 | | - end |
| 5 | +role = 'auxtel-archiver' |
| 6 | + |
| 7 | +describe "#{role} role" do |
| 8 | + on_supported_os.each do |os, facts| |
| 9 | + context "on #{os}" do |
| 10 | + let(:facts) do |
| 11 | + facts.merge( |
| 12 | + fqdn: self.class.description, |
| 13 | + ) |
| 14 | + end |
| 15 | + |
| 16 | + let(:node_params) do |
| 17 | + { |
| 18 | + role: role, |
| 19 | + site: site, |
| 20 | + } |
41 | 21 | end |
42 | | - end # site |
43 | | - end # role |
44 | | -end |
| 22 | + |
| 23 | + lsst_sites.each do |site| |
| 24 | + describe "#{role}.#{site}.lsst.org", :site, :common do |
| 25 | + let(:site) { site } |
| 26 | + |
| 27 | + it { is_expected.to compile.with_all_deps } |
| 28 | + |
| 29 | + include_examples 'lhn sysctls' |
| 30 | + include_examples 'archiver' |
| 31 | + |
| 32 | + it { is_expected.to contain_file('/data/repo/LATISS') } |
| 33 | + |
| 34 | + it { is_expected.to contain_rabbitmq_vhost('/test_at') } |
| 35 | + it { is_expected.to contain_rabbitmq_user_permissions('iip@/test_at') } |
| 36 | + it { is_expected.to contain_rabbitmq_user_permissions('guest@/test_at') } |
| 37 | + it { is_expected.to contain_rabbitmq_exchange('message@/test_at') } |
| 38 | + |
| 39 | + %w[ |
| 40 | + f98_consume@/test_at |
| 41 | + f99_consume@/test_at |
| 42 | + at_foreman_ack_publish@/test_at |
| 43 | + at_publish_to_oods@/test_at |
| 44 | + oods_publish_to_at@/test_at |
| 45 | + archive_ctrl_publish@/test_at |
| 46 | + archive_ctrl_consume@/test_at |
| 47 | + telemetry_queue@/test_at |
| 48 | + ].each do |q| |
| 49 | + it { is_expected.to contain_rabbitmq_queue(q) } |
| 50 | + it { is_expected.to contain_rabbitmq_binding("message@#{q}") } |
| 51 | + end |
| 52 | + end # host |
| 53 | + end # lsst_sites |
| 54 | + end # on os |
| 55 | + end # on_supported_os |
| 56 | +end # role |
0 commit comments