Skip to content

Commit a73ee8e

Browse files
committed
Update a couple tests to reflect actual errors passed
1 parent b8f3f10 commit a73ee8e

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

spec/octocatalog-diff/integration/pe_enc_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ def self.respond(code, message, content_type = nil, body = '')
129129
}
130130
result = OctocatalogDiff::Integration.integration(opts)
131131
expect(result[:exitcode]).to eq(-1)
132-
expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError')
133-
expect(result[:exception].message).to match(/OpenSSL::SSL::SSLError/)
132+
expect(result[:exception].class.to_s).to eq('OpenSSL::SSL::SSLError')
134133
end
135134

136135
# Make sure the catalog compiles with data taken from the ENC
@@ -194,7 +193,7 @@ def self.respond(code, message, content_type = nil, body = '')
194193
}
195194
result = OctocatalogDiff::Integration.integration(opts)
196195
expect(result[:exitcode]).to eq(-1)
197-
expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError')
196+
expect(result[:exception].class.to_s).to eq('RuntimeError')
198197
expect(result[:exception].message).to match(/Failed ENC: Response from https:.+rspec-node.xyz.github.net was 403/)
199198
end
200199

@@ -212,7 +211,7 @@ def self.respond(code, message, content_type = nil, body = '')
212211
}
213212
result = OctocatalogDiff::Integration.integration(opts)
214213
expect(result[:exitcode]).to eq(-1)
215-
expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError')
214+
expect(result[:exception].class.to_s).to eq('RuntimeError')
216215
expect(result[:exception].message).to match(/Failed ENC: Response from https:.+rspec-node.xyz.github.net was 403/)
217216
end
218217

spec/octocatalog-diff/integration/puppetmaster_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def self.response(method, uri, _headers, body)
157157
}
158158
result = OctocatalogDiff::Integration.integration(opts)
159159
expect(result[:exitcode]).to eq(-1)
160-
expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError')
161-
expect(result[:exception].message).to match(/OpenSSL::SSL::SSLError/)
160+
expect(result[:exception].class.to_s).to eq('OpenSSL::SSL::SSLError')
162161
end
163162

164163
it 'should fail when the node is not found in PuppetDB' do

0 commit comments

Comments
 (0)