|
42 | 42 | let(:download_cache) { described_class.new(mutable_cache_root, immutable_cache_root) } |
43 | 43 |
|
44 | 44 | before do |
45 | | - described_class.const_set :CA_CERTS_DIRECTORY, ca_certs_directory |
| 45 | + described_class.const_set :CA_FILE, ca_certs_directory |
46 | 46 | end |
47 | 47 |
|
48 | 48 | it 'should raise error if file cannot be found', |
|
234 | 234 |
|
235 | 235 | end |
236 | 236 |
|
237 | | - it 'should not use ca_path if the URL is not secure and directory does not exist' do |
| 237 | + it 'should not use ca_file if the URL is not secure and directory does not exist' do |
238 | 238 | stub_request(:get, uri) |
239 | 239 | .to_return(status: 200, body: 'foo-cached', headers: { Etag: 'foo-etag', 'Last-Modified' => 'foo-last-modified' }) |
240 | 240 |
|
|
245 | 245 | download_cache.get(uri) {} |
246 | 246 | end |
247 | 247 |
|
248 | | - it 'should not use ca_path if the URL is not secure and directory does exist' do |
| 248 | + it 'should not use ca_file if the URL is not secure and directory does exist' do |
249 | 249 | stub_request(:get, uri) |
250 | 250 | .to_return(status: 200, body: 'foo-cached', headers: { Etag: 'foo-etag', 'Last-Modified' => 'foo-last-modified' }) |
251 | 251 |
|
|
257 | 257 | download_cache.get(uri) {} |
258 | 258 | end |
259 | 259 |
|
260 | | - it 'should not use ca_path if the URL is secure and directory does not exist' do |
| 260 | + it 'should not use ca_file if the URL is secure and directory does not exist' do |
261 | 261 | stub_request(:get, uri_secure) |
262 | 262 | .to_return(status: 200, body: 'foo-cached', headers: { Etag: 'foo-etag', 'Last-Modified' => 'foo-last-modified' }) |
263 | 263 |
|
|
269 | 269 | download_cache.get(uri_secure) {} |
270 | 270 | end |
271 | 271 |
|
272 | | - it 'should use ca_path if the URL is secure and directory does exist' do |
| 272 | + it 'should use ca_file if the URL is secure and directory does exist' do |
273 | 273 | stub_request(:get, uri_secure) |
274 | 274 | .to_return(status: 200, body: 'foo-cached', headers: { Etag: 'foo-etag', 'Last-Modified' => 'foo-last-modified' }) |
275 | 275 |
|
276 | 276 | allow(ca_certs_directory).to receive(:exist?).and_return(true) |
277 | 277 | allow(Net::HTTP).to receive(:Proxy).and_call_original |
278 | 278 | expect(Net::HTTP).to receive(:start) |
279 | 279 | .with('foo-uri', 443, connect_timeout: 10, open_timeout: 10, read_timeout: 10, use_ssl: true, |
280 | | - ca_path: 'test-path').and_call_original |
| 280 | + ca_file: 'test-path').and_call_original |
281 | 281 |
|
282 | 282 | download_cache.get(uri_secure) {} |
283 | 283 | end |
|
0 commit comments