|
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).without_content(%r{name: }) } |
24 | 25 | it { should contain_file(conf_file).without_content(%r{url: }) } |
25 | 26 | it { should contain_file(conf_file).without_content(%r{username: }) } |
26 | 27 | it { should contain_file(conf_file).without_content(%r{password: }) } |
|
36 | 37 |
|
37 | 38 | context 'with parameters set' do |
38 | 39 | let(:params) {{ |
| 40 | + sitename: 'foo.bar.baz', |
39 | 41 | url: 'http://foo.bar.baz:4096', |
40 | 42 | username: 'foouser', |
41 | 43 | password: 'barpassword', |
|
47 | 49 | disable_ssl_validation: true, |
48 | 50 | }} |
49 | 51 |
|
| 52 | + it { should contain_file(conf_file).with_content(%r{name: foo.bar.baz}) } |
50 | 53 | it { should contain_file(conf_file).with_content(%r{url: http://foo.bar.baz:4096}) } |
51 | 54 | it { should contain_file(conf_file).with_content(%r{username: foouser}) } |
52 | 55 | it { should contain_file(conf_file).with_content(%r{password: barpassword}) } |
|
60 | 63 |
|
61 | 64 | context 'with headers parameter array' do |
62 | 65 | let(:params) {{ |
| 66 | + sitename: 'foo.bar.baz', |
63 | 67 | url: 'http://foo.bar.baz:4096', |
64 | 68 | headers: %w{ foo bar baz }, |
65 | 69 | }} |
|
69 | 73 | context 'with headers parameter empty values' do |
70 | 74 | context 'mixed in with other headers' do |
71 | 75 | let(:params) {{ |
| 76 | + sitename: 'foo.bar.baz', |
72 | 77 | url: 'http://foo.bar.baz:4096', |
73 | 78 | headers: [ 'foo', '', 'baz' ] |
74 | 79 | }} |
|
96 | 101 |
|
97 | 102 | context 'with tags parameter array' do |
98 | 103 | let(:params) {{ |
| 104 | + sitename: 'foo.bar.baz', |
99 | 105 | url: 'http://foo.bar.baz:4096', |
100 | 106 | tags: %w{ foo bar baz }, |
101 | 107 | }} |
|
105 | 111 | context 'with tags parameter empty values' do |
106 | 112 | context 'mixed in with other tags' do |
107 | 113 | let(:params) {{ |
| 114 | + sitename: 'foo.bar.baz', |
108 | 115 | url: 'http://foo.bar.baz:4096', |
109 | 116 | tags: [ 'foo', '', 'baz' ] |
110 | 117 | }} |
|
0 commit comments