|
22 | 22 | opts = { argv: ['-n', 'not-found-node.github.net'], spec_repo: 'tiny-repo' } |
23 | 23 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
24 | 24 | expect(result[:exitcode]).to eq(-1), OctocatalogDiff::Integration.format_exception(result) |
25 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
26 | | - expect(result[:exception].message).to match(/FactRetrievalError: Node not-found-node.github.net not found in PuppetDB/) |
| 25 | + expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::FactRetrievalError') |
| 26 | + expect(result[:exception].message).to match(/Node not-found-node.github.net not found in PuppetDB/) |
27 | 27 | end |
28 | 28 | end |
29 | 29 |
|
|
53 | 53 | opts = { argv: args, spec_repo: 'tiny-repo' } |
54 | 54 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
55 | 55 | expect(result[:exitcode]).to eq(-1), OctocatalogDiff::Integration.format_exception(result) |
56 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
57 | | - expect(result[:exception].message).to match(/OpenSSL::SSL::SSLError/) |
| 56 | + expect(result[:exception].class.to_s).to eq('OpenSSL::SSL::SSLError') |
58 | 57 | end |
59 | 58 |
|
60 | 59 | it 'should fail if server certificate was not signed by CA', retry: 3 do |
|
71 | 70 | opts = { argv: args, spec_repo: 'tiny-repo' } |
72 | 71 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
73 | 72 | expect(result[:exitcode]).to eq(-1), OctocatalogDiff::Integration.format_exception(result) |
74 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
75 | | - expect(result[:exception].message).to match(/OpenSSL::SSL::SSLError/) |
| 73 | + expect(result[:exception].class.to_s).to eq('OpenSSL::SSL::SSLError') |
76 | 74 | end |
77 | 75 | end |
78 | 76 |
|
|
88 | 86 | it 'should fail to connect to authenticated puppetdb with no client cert', retry: 3 do |
89 | 87 | opts = { argv: ['-n', 'rspec-node.github.net'], spec_repo: 'tiny-repo' } |
90 | 88 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
91 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
92 | | - expect(result[:exception].message).to match(/OpenSSL::SSL::SSLError/) |
| 89 | + expect(result[:exception].class.to_s).to eq('OpenSSL::SSL::SSLError') |
93 | 90 | end |
94 | 91 |
|
95 | 92 | it 'should connect to authenticated puppetdb with client keypair', retry: 3 do |
|
127 | 124 | opts = { argv: arg, spec_repo: 'tiny-repo' } |
128 | 125 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
129 | 126 | expect(result[:exitcode]).to eq(-1), OctocatalogDiff::Integration.format_exception(result) |
130 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
131 | | - expect(result[:exception].message).to match(/OpenSSL::PKey::RSAError/) |
| 127 | + expect(result[:exception].class.to_s).to eq('OpenSSL::PKey::RSAError') |
132 | 128 | end |
133 | 129 |
|
134 | 130 | it 'should fail with password-protected client cert and missing password to authenticated puppetdb', retry: 3 do |
|
140 | 136 | opts = { argv: arg, spec_repo: 'tiny-repo' } |
141 | 137 | result = OctocatalogDiff::Integration.integration_with_puppetdb(s_opts, opts) |
142 | 138 | expect(result[:exitcode]).to eq(-1), OctocatalogDiff::Integration.format_exception(result) |
143 | | - expect(result[:exception].class.to_s).to eq('OctocatalogDiff::Errors::CatalogError') |
144 | | - expect(result[:exception].message).to match(/OpenSSL::PKey::RSAError/) |
| 139 | + expect(result[:exception].class.to_s).to eq('OpenSSL::PKey::RSAError') |
145 | 140 | end |
146 | 141 | end |
147 | 142 | end |
0 commit comments