|
21 | 21 | it { should contain_file(conf_file).that_notifies("Service[#{dd_service}]") } |
22 | 22 |
|
23 | 23 | context 'with default parameters' do |
24 | | - it { should contain_file(conf_file).with_content(%r{rabbitmq_api_url: }) } |
25 | | - it { should contain_file(conf_file).without_content(%r{rabbitmq_user: }) } |
26 | | - it { should contain_file(conf_file).without_content(%r{rabbitmq_pass: }) } |
27 | | - it { should contain_file(conf_file).without_content(%r{queues: }) } |
28 | | - it { should contain_file(conf_file).without_content(%r{vhosts: }) } |
| 24 | + it { should contain_file(conf_file).with_content(%r{rabbitmq_api_url:}) } |
| 25 | + it { should contain_file(conf_file).with_content(%r{rabbitmq_user: guest}) } |
| 26 | + it { should contain_file(conf_file).with_content(%r{rabbitmq_pass: guest}) } |
| 27 | + it { should contain_file(conf_file).with_content(%r{ssl_verify: true}) } |
| 28 | + it { should contain_file(conf_file).with_content(%r{tag_families: false}) } |
| 29 | + it { should contain_file(conf_file).without_content(%r{nodes:}) } |
| 30 | + it { should contain_file(conf_file).without_content(%r{nodes_regexes:}) } |
| 31 | + it { should contain_file(conf_file).without_content(%r{queues:}) } |
| 32 | + it { should contain_file(conf_file).without_content(%r{queues_regexes:}) } |
| 33 | + it { should contain_file(conf_file).without_content(%r{vhosts:}) } |
29 | 34 | end |
30 | 35 |
|
31 | 36 | context 'with parameters set' do |
32 | 37 | let(:params) {{ |
33 | 38 | url: 'http://rabbit1:15672/', |
34 | 39 | username: 'foo', |
35 | 40 | password: 'bar', |
| 41 | + ssl_verify: false, |
| 42 | + tag_families: true, |
| 43 | + nodes: %w{ node1 node2 node3 }, |
| 44 | + nodes_regexes: %w{ ^regex1 regex2$ regex3* }, |
36 | 45 | queues: %w{ queue1 queue2 queue3 }, |
| 46 | + queues_regexes: %w{ ^regex4 regex5$ regex6* }, |
37 | 47 | vhosts: %w{ vhost1 vhost2 vhost3 }, |
38 | 48 | }} |
39 | 49 | it { should contain_file(conf_file).with_content(%r{rabbitmq_api_url: http://rabbit1:15672/}) } |
40 | 50 | it { should contain_file(conf_file).with_content(%r{rabbitmq_user: foo}) } |
41 | 51 | it { should contain_file(conf_file).with_content(%r{rabbitmq_pass: bar}) } |
| 52 | + it { should contain_file(conf_file).with_content(%r{ssl_verify: false}) } |
| 53 | + it { should contain_file(conf_file).with_content(%r{tag_families: true}) } |
| 54 | + it { should contain_file(conf_file).with_content(%r{nodes:\s+- node1\s+- node2\s+- node3}) } |
| 55 | + it { should contain_file(conf_file).with_content(%r{nodes_regexes:\s+- \^regex1\s+- regex2\$\s+- regex3\* }) } |
42 | 56 | it { should contain_file(conf_file).with_content(%r{queues:\s+- queue1\s+- queue2\s+- queue3}) } |
| 57 | + it { should contain_file(conf_file).with_content(%r{queues_regexes:\s+- \^regex4\s+- regex5\$\s+- regex6\* }) } |
43 | 58 | it { should contain_file(conf_file).with_content(%r{vhosts:\s+- vhost1\s+- vhost2\s+- vhost3}) } |
44 | 59 | end |
45 | 60 | end |
0 commit comments