|
22 | 22 | it { should contain_file(conf_file).that_notifies("Service[#{dd_service}]") } |
23 | 23 |
|
24 | 24 | context 'with default parameters' do |
25 | | - it { should contain_file(conf_file).with_content(%r{url: http://localhost:9200}) } |
| 25 | + it { should contain_file(conf_file).with_content(%r{ - url: http://localhost:9200}) } |
| 26 | + it { should contain_file(conf_file).with_content(%r{ cluster_stats: false}) } |
| 27 | + it { should contain_file(conf_file).with_content(%r{ pending_task_stats: true}) } |
| 28 | + it { should contain_file(conf_file).with_content(%r{ pshard_stats: false}) } |
| 29 | + it { should_not contain_file(conf_file).with_content(%r{ username}) } |
| 30 | + it { should_not contain_file(conf_file).with_content(%r{ password}) } |
| 31 | + it { should_not contain_file(conf_file).with_content(%r{ ssl_verify}) } |
| 32 | + it { should_not contain_file(conf_file).with_content(%r{ ssl_cert}) } |
| 33 | + it { should_not contain_file(conf_file).with_content(%r{ ssl_key}) } |
| 34 | + it { should_not contain_file(conf_file).with_content(%r{ tags:}) } |
26 | 35 | end |
27 | | - |
28 | | - context 'with parameters set' do |
| 36 | +context 'with parameters set' do |
29 | 37 | let(:params) {{ |
30 | | - url: 'http://foo:4242', |
| 38 | + password: 'password', |
| 39 | + pending_task_stats: false, |
| 40 | + url: 'https://foo:4242', |
| 41 | + username: 'username', |
| 42 | + ssl_cert: '/etc/ssl/certs/client.pem', |
| 43 | + ssl_key: '/etc/ssl/private/client.key', |
| 44 | + tags: ['tag1:key1'], |
31 | 45 | }} |
32 | | - it { should contain_file(conf_file).with_content(%r{http://foo:4242}) } |
| 46 | + it { should contain_file(conf_file).with_content(%r{ - url: https://foo:4242}) } |
| 47 | + it { should contain_file(conf_file).with_content(%r{ pending_task_stats: false}) } |
| 48 | + it { should contain_file(conf_file).with_content(%r{ username: username}) } |
| 49 | + it { should contain_file(conf_file).with_content(%r{ password: password}) } |
| 50 | + it { should contain_file(conf_file).with_content(%r{ ssl_verify: true}) } |
| 51 | + it { should contain_file(conf_file).with_content(%r{ ssl_cert: /etc/ssl/certs/client.pem}) } |
| 52 | + it { should contain_file(conf_file).with_content(%r{ ssl_key: /etc/ssl/private/client.key}) } |
| 53 | + it { should contain_file(conf_file).with_content(%r{ tags:}) } |
| 54 | + it { should contain_file(conf_file).with_content(%r{ - tag1:key1}) } |
33 | 55 | end |
34 | 56 |
|
35 | 57 | end |
0 commit comments