docker-armada 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/armada/connection/docker.rb +1 -2
- data/spec/connection/docker_spec.rb +21 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3736e08a4a96d2d25595cc4ea868846c3b24f396
|
4
|
+
data.tar.gz: f9e925d2fb2a4a7cfa357e2621d5fae915966231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8a188a837b9b39b6ff9330486ee0603e355f6c8e221a49cb87a7b62cbe5e6e2e9a70546e9e29de2c1ae892f26a9ff715a7d1b0f5845aaf14f408a7788422137
|
7
|
+
data.tar.gz: eb4a628a1d631aa4276d6e44f5ce82ffbb09e05c4bf53f1062146880c21f55adc62275aff5e7407e331fa68b4e146efd8b0f18b7d0a53e871a95a76c472f121d
|
@@ -24,12 +24,11 @@ module Armada
|
|
24
24
|
|
25
25
|
def connection_opts
|
26
26
|
opts = {}
|
27
|
-
|
28
27
|
if cert_path = ENV['DOCKER_CERT_PATH']
|
29
28
|
opts[:client_cert] = File.join(cert_path, 'cert.pem')
|
30
29
|
opts[:client_key] = File.join(cert_path, 'key.pem')
|
31
30
|
opts[:ssl_ca_file] = File.join(cert_path, 'ca.pem')
|
32
|
-
opts[:ssl_verify_peer] = false
|
31
|
+
opts[:ssl_verify_peer] = @gateway ? false : ENV['DOCKER_TLS_VERIFY'] == '1'
|
33
32
|
end
|
34
33
|
|
35
34
|
opts
|
@@ -19,6 +19,9 @@ describe Armada::Connection::Docker do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
context 'when docker tls verify is set' do
|
23
|
+
end
|
24
|
+
|
22
25
|
context 'when certificate path is set' do
|
23
26
|
before(:each) { ENV['DOCKER_CERT_PATH'] = '/some/cert/path' }
|
24
27
|
|
@@ -31,8 +34,24 @@ describe Armada::Connection::Docker do
|
|
31
34
|
context 'connection options' do
|
32
35
|
subject { connection.options }
|
33
36
|
|
34
|
-
it { should include(:client_cert, :client_key, :ssl_ca_file) }
|
35
|
-
|
37
|
+
it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
|
38
|
+
its([:ssl_verify_peer]) { should be_false }
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'disable TLS verify' do
|
42
|
+
before(:each) { ENV['DOCKER_TLS_VERIFY'] = '0'}
|
43
|
+
subject { connection.options }
|
44
|
+
|
45
|
+
it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
|
46
|
+
its([:ssl_verify_peer]) { should be_false }
|
47
|
+
end
|
48
|
+
|
49
|
+
context 'enable TLS verify' do
|
50
|
+
before(:each) { ENV['DOCKER_TLS_VERIFY'] = '1'}
|
51
|
+
subject { connection.options }
|
52
|
+
|
53
|
+
it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
|
54
|
+
its([:ssl_verify_peer]) { should be_true }
|
36
55
|
end
|
37
56
|
end
|
38
57
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-armada
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chauncey
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: excon
|