|
44 | 44 | is_expected.not_to contain_yumrepo('datadog6') |
45 | 45 | end |
46 | 46 | end |
47 | | - context 'overriding provider' do |
48 | | - let(:params) do |
49 | | - { |
50 | | - service_provider: 'upstart', |
51 | | - agent_major_version: 5, |
52 | | - } |
53 | | - end |
54 | | - |
55 | | - it do |
56 | | - is_expected.to contain_service('datadog-agent')\ |
57 | | - .that_requires('package[datadog-agent]') |
58 | | - end |
59 | | - it do |
60 | | - is_expected.to contain_service('datadog-agent').with( |
61 | | - 'provider' => 'upstart', |
62 | | - 'ensure' => 'running', |
63 | | - ) |
64 | | - end |
65 | | - end |
66 | | - |
67 | 47 | # it should install the packages |
68 | 48 | it do |
69 | 49 | is_expected.to contain_package('datadog-agent')\ |
70 | 50 | .with_ensure('latest') |
71 | 51 | end |
72 | 52 |
|
73 | | - # it should be able to start the service and enable the service by default |
74 | | - it do |
75 | | - is_expected.to contain_service('datadog-agent')\ |
76 | | - .that_requires('Package[datadog-agent]') |
77 | | - end |
| 53 | + |
78 | 54 | end |
79 | 55 |
|
80 | 56 | context 'agent 6' do |
|
115 | 91 | is_expected.not_to contain_yumrepo('datadog6') |
116 | 92 | end |
117 | 93 | end |
118 | | - context 'overriding provider' do |
119 | | - let(:params) do |
120 | | - { |
121 | | - service_provider: 'upstart', |
122 | | - agent_major_version: 6, |
123 | | - } |
124 | | - end |
125 | | - |
126 | | - it do |
127 | | - is_expected.to contain_service('datadog-agent')\ |
128 | | - .that_requires('package[datadog-agent]') |
129 | | - end |
130 | | - it do |
131 | | - is_expected.to contain_service('datadog-agent').with( |
132 | | - 'provider' => 'upstart', |
133 | | - 'ensure' => 'running', |
134 | | - ) |
135 | | - end |
136 | | - end |
137 | 94 |
|
138 | 95 | # it should install the packages |
139 | 96 | it do |
140 | 97 | is_expected.to contain_package('datadog-agent')\ |
141 | 98 | .with_ensure('latest') |
142 | 99 | end |
143 | 100 |
|
144 | | - # it should be able to start the service and enable the service by default |
145 | | - it do |
146 | | - is_expected.to contain_service('datadog-agent')\ |
147 | | - .that_requires('Package[datadog-agent]') |
148 | | - end |
149 | 101 | end |
150 | 102 |
|
151 | 103 | context 'agent 7' do |
|
187 | 139 | is_expected.not_to contain_yumrepo('datadog6') |
188 | 140 | end |
189 | 141 | end |
190 | | - context 'overriding provider' do |
191 | | - let(:params) do |
192 | | - { |
193 | | - service_provider: 'upstart', |
194 | | - agent_major_version: 7, |
195 | | - } |
196 | | - end |
197 | | - |
198 | | - it do |
199 | | - is_expected.to contain_service('datadog-agent')\ |
200 | | - .that_requires('package[datadog-agent]') |
201 | | - end |
202 | | - it do |
203 | | - is_expected.to contain_service('datadog-agent').with( |
204 | | - 'provider' => 'upstart', |
205 | | - 'ensure' => 'running', |
206 | | - ) |
207 | | - end |
208 | | - end |
209 | 142 |
|
210 | 143 | # it should install the packages |
211 | 144 | it do |
212 | 145 | is_expected.to contain_package('datadog-agent')\ |
213 | 146 | .with_ensure('latest') |
214 | 147 | end |
215 | 148 |
|
216 | | - # it should be able to start the service and enable the service by default |
217 | | - it do |
218 | | - is_expected.to contain_service('datadog-agent')\ |
219 | | - .that_requires('Package[datadog-agent]') |
220 | | - end |
221 | 149 | end |
222 | 150 | end |
0 commit comments