@@ -102,20 +102,16 @@ def self.catalog_contains_resource(result, type, title)
102
102
expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
103
103
end
104
104
105
- if OctocatalogDiff ::Spec . is_puppet5?
106
- it 'should raise CatalogError' do
107
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
108
- end
105
+ it 'should raise CatalogError' do
106
+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
107
+ end
109
108
109
+ if OctocatalogDiff ::Spec . is_puppet5?
110
110
it 'should pass through the error messages from Puppet' do
111
111
msg = @result . exception . message
112
112
expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ subscribe target\] ' in parameter 'subscribe' at/ )
113
113
end
114
114
else
115
- it 'should raise ReferenceValidationError' do
116
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
117
- end
118
-
119
115
# Multiple line numbers given because Puppet 4.x and 3.8 correspond to first and last line of resource, respectively.
120
116
# rubocop:disable Metrics/LineLength
121
117
it 'should have formatted error messages' do
@@ -139,20 +135,16 @@ def self.catalog_contains_resource(result, type, title)
139
135
expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
140
136
end
141
137
142
- if OctocatalogDiff ::Spec . is_puppet5?
143
- it 'should raise CatalogError' do
144
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
145
- end
138
+ it 'should raise CatalogError' do
139
+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
140
+ end
146
141
142
+ if OctocatalogDiff ::Spec . is_puppet5?
147
143
it 'should pass through the error messages from Puppet' do
148
144
msg = @result . exception . message
149
145
expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ before target\] ' in parameter 'before' at/ )
150
146
end
151
147
else
152
- it 'should raise ReferenceValidationError' do
153
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
154
- end
155
-
156
148
# rubocop:disable Metrics/LineLength
157
149
it 'should have formatted error messages' do
158
150
msg = @result . exception . message
@@ -171,20 +163,16 @@ def self.catalog_contains_resource(result, type, title)
171
163
expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
172
164
end
173
165
174
- if OctocatalogDiff ::Spec . is_puppet5?
175
- it 'should raise CatalogError' do
176
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
177
- end
166
+ it 'should raise CatalogError' do
167
+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
168
+ end
178
169
170
+ if OctocatalogDiff ::Spec . is_puppet5?
179
171
it 'should pass through the error messages from Puppet' do
180
172
msg = @result . exception . message
181
173
expect ( msg ) . to match ( /Error: Could not find resource 'Test::Foo::Bar\[ notify target\] ' in parameter 'notify' at/ )
182
174
end
183
175
else
184
- it 'should raise ReferenceValidationError' do
185
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
186
- end
187
-
188
176
# rubocop:disable Metrics/LineLength
189
177
it 'should have formatted error messages' do
190
178
msg = @result . exception . message
@@ -203,20 +191,16 @@ def self.catalog_contains_resource(result, type, title)
203
191
expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
204
192
end
205
193
206
- if OctocatalogDiff ::Spec . is_puppet5?
207
- it 'should raise CatalogError' do
208
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
209
- end
194
+ it 'should raise CatalogError' do
195
+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
196
+ end
210
197
198
+ if OctocatalogDiff ::Spec . is_puppet5?
211
199
it 'should pass through the error messages from Puppet' do
212
200
msg = @result . exception . message
213
201
expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ require target\] ' in parameter 'require' at/ )
214
202
end
215
203
else
216
- it 'should raise ReferenceValidationError' do
217
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
218
- end
219
-
220
204
# rubocop:disable Metrics/LineLength
221
205
it 'should have formatted error messages' do
222
206
msg = @result . exception . message
@@ -287,20 +271,16 @@ def self.catalog_contains_resource(result, type, title)
287
271
expect ( @result . exitcode ) . to eq ( -1 ) , OctocatalogDiff ::Integration . format_exception ( @result )
288
272
end
289
273
290
- if OctocatalogDiff ::Spec . is_puppet5?
291
- it 'should raise CatalogError' do
292
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
293
- end
274
+ it 'should raise CatalogError' do
275
+ expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
276
+ end
294
277
278
+ if OctocatalogDiff ::Spec . is_puppet5?
295
279
it 'should pass through the error messages from Puppet' do
296
280
msg = @result . exception . message
297
281
expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ before alias target\] ' in parameter 'before'/ )
298
282
end
299
283
else
300
- it 'should raise ReferenceValidationError' do
301
- expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
302
- end
303
-
304
284
# rubocop:disable Metrics/LineLength
305
285
it 'should have formatted error messages' do
306
286
msg = @result . exception . message
0 commit comments