kitchen-openstack 2.0.0.dev → 2.0.0.dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/openstack.rb +1 -15
- data/lib/kitchen/driver/openstack_version.rb +1 -1
- data/spec/kitchen/driver/openstack_spec.rb +1 -37
- 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: acd555f1b4b006c17ea0030ccee6c4da9dceb13e
|
4
|
+
data.tar.gz: d6468aa93803c937b0dc5aed9c049953e1ee377b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5461211b6a784b0bb47d408c792d9a30ada1e975fe32db3e9eba608e740e37410323135be7726e77e18e8b36082382324cd353d2fdb2f79da8fdc43ca074261
|
7
|
+
data.tar.gz: 0cbf940c21cf605b92ad2d4d4340da935a9a17ac724339322a7f731a67f80f9e1bd9683bc36a082183ce3a1b4331b1e1ae9559adf108ca67d879c957bbac958f
|
@@ -61,7 +61,7 @@ module Kitchen
|
|
61
61
|
default_config :network_ref, nil
|
62
62
|
default_config :no_ssh_tcp_check, false
|
63
63
|
default_config :no_ssh_tcp_check_sleep, 120
|
64
|
-
default_config :winrm_wait,
|
64
|
+
default_config :winrm_wait, nil
|
65
65
|
default_config :block_device_mapping, nil
|
66
66
|
|
67
67
|
required_config :private_key_path
|
@@ -341,7 +341,6 @@ module Kitchen
|
|
341
341
|
end
|
342
342
|
|
343
343
|
def setup_ssh(server, state)
|
344
|
-
tcp_check(state)
|
345
344
|
if config[:key_name]
|
346
345
|
info "Using OpenStack keypair <#{config[:key_name]}>"
|
347
346
|
end
|
@@ -364,19 +363,6 @@ module Kitchen
|
|
364
363
|
])
|
365
364
|
end
|
366
365
|
|
367
|
-
def tcp_check(state)
|
368
|
-
# allow driver config to bypass SSH tcp check -- because
|
369
|
-
# it doesn't respect ssh_config values that might be required
|
370
|
-
if config[:no_ssh_tcp_check]
|
371
|
-
sleep(config[:no_ssh_tcp_check_sleep])
|
372
|
-
else
|
373
|
-
wait_for_sshd(state[:hostname],
|
374
|
-
config[:username],
|
375
|
-
port: config[:port])
|
376
|
-
end
|
377
|
-
info "Server #{state[:hostname]} has ssh ready..."
|
378
|
-
end
|
379
|
-
|
380
366
|
def disable_ssl_validation
|
381
367
|
require 'excon'
|
382
368
|
Excon.defaults[:ssl_verify_peer] = false
|
@@ -196,6 +196,7 @@ describe Kitchen::Driver::Openstack do
|
|
196
196
|
allow(d).to receive(:add_ohai_hint).and_return(true)
|
197
197
|
allow(d).to receive(:do_ssh_setup).and_return(true)
|
198
198
|
allow(d).to receive(:sleep)
|
199
|
+
allow(d).to receive(:wait_for_ssh_key_access).and_return('SSH key authetication successful') # rubocop:disable Metrics/LineLength
|
199
200
|
d
|
200
201
|
end
|
201
202
|
|
@@ -1104,43 +1105,6 @@ describe Kitchen::Driver::Openstack do
|
|
1104
1105
|
end
|
1105
1106
|
end
|
1106
1107
|
|
1107
|
-
describe '#setup_ssh' do
|
1108
|
-
let(:server) { double }
|
1109
|
-
before(:each) do
|
1110
|
-
[:tcp_check, :do_ssh_setup].each do |m|
|
1111
|
-
allow_any_instance_of(described_class).to receive(m)
|
1112
|
-
end
|
1113
|
-
end
|
1114
|
-
|
1115
|
-
it 'calls the TCP check' do
|
1116
|
-
expect_any_instance_of(described_class).to receive(:tcp_check).with(state)
|
1117
|
-
driver.send(:setup_ssh, server, state)
|
1118
|
-
end
|
1119
|
-
end
|
1120
|
-
|
1121
|
-
describe '#tcp_check' do
|
1122
|
-
let(:state) { { hostname: 'hostname' } }
|
1123
|
-
|
1124
|
-
context 'standard SSH check' do
|
1125
|
-
it 'calls the normal Kitchen SSH wait' do
|
1126
|
-
expect_any_instance_of(described_class).not_to receive(:sleep)
|
1127
|
-
expect_any_instance_of(described_class).to receive(:wait_for_sshd)
|
1128
|
-
.with('hostname', 'root', port: '22')
|
1129
|
-
driver.send(:tcp_check, state)
|
1130
|
-
end
|
1131
|
-
end
|
1132
|
-
|
1133
|
-
context 'override SSH wait' do
|
1134
|
-
let(:config) { { no_ssh_tcp_check: true } }
|
1135
|
-
|
1136
|
-
it 'sleeps instead of monitoring the SSH port' do
|
1137
|
-
expect_any_instance_of(described_class).not_to receive(:wait_for_sshd)
|
1138
|
-
expect_any_instance_of(described_class).to receive(:sleep).with(120)
|
1139
|
-
driver.send(:tcp_check, state)
|
1140
|
-
end
|
1141
|
-
end
|
1142
|
-
end
|
1143
|
-
|
1144
1108
|
describe '#disable_ssl_validation' do
|
1145
1109
|
it 'turns off Excon SSL cert validation' do
|
1146
1110
|
expect(driver.send(:disable_ssl_validation)).to eq(false)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-openstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.dev
|
4
|
+
version: 2.0.0.dev.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hartman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-kitchen
|