kitchen-openstack 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -3
- data/.travis.yml +3 -3
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/kitchen/driver/openstack.rb +2 -1
- data/lib/kitchen/driver/openstack_version.rb +1 -1
- data/spec/kitchen/driver/openstack_spec.rb +21 -12
- data/spec/spec_helper.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ada2dfc8390553bc3b419e50b3561a97a52dcb18
|
4
|
+
data.tar.gz: 91b3b46bd248411691f9bff8fa424c3225580cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf3719c9a0baf7c0e54a8618598525be1484910efe0a8d1ec3714a0c9fc3a8b705bc9776db5b2ece5f1e5b532334db814ad2e601a4b5c326a35c5cbb699a493
|
7
|
+
data.tar.gz: e4af2de8a2b0433441a58e50bad8557c63800d18bc07cc45633dadac0878808100e1581c8c20b39499a44b5101c054934b14e762069f278b6be557c1300debb2
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 1.7.1 / 2015-01-07
|
2
|
+
|
3
|
+
* PR [#70][] - Use configured password for SSH access, if provided
|
4
|
+
|
1
5
|
# 1.7.0 / 2014-10-25
|
2
6
|
|
3
7
|
### New Features
|
@@ -134,6 +138,7 @@ certain specified NICs; via [@monsterzz][]
|
|
134
138
|
|
135
139
|
* Initial release! Woo!
|
136
140
|
|
141
|
+
[#70]: https://github.com/test-kitchen/kitchen-openstack/pull/70
|
137
142
|
[#66]: https://github.com/test-kitchen/kitchen-openstack/pull/66
|
138
143
|
[#63]: https://github.com/test-kitchen/kitchen-openstack/pull/63
|
139
144
|
[#62]: https://github.com/test-kitchen/kitchen-openstack/pull/62
|
data/README.md
CHANGED
@@ -50,6 +50,7 @@ behavior can be overridden with additional options:
|
|
50
50
|
private_key_path: [PATH TO YOUR PRIVATE SSH KEY]
|
51
51
|
public_key_path: [PATH TO YOUR SSH PUBLIC KEY]
|
52
52
|
username: [SSH USER]
|
53
|
+
password: [SSH PASSWORD]
|
53
54
|
port: [SSH PORT]
|
54
55
|
key_name: [SSH KEY NAME]
|
55
56
|
openstack_tenant: [YOUR OPENSTACK TENANT ID]
|
@@ -45,6 +45,7 @@ module Kitchen
|
|
45
45
|
driver[:private_key_path] + '.pub'
|
46
46
|
end
|
47
47
|
default_config :username, 'root'
|
48
|
+
default_config :password, nil
|
48
49
|
default_config :port, '22'
|
49
50
|
default_config :use_ipv6, false
|
50
51
|
default_config :openstack_tenant, nil
|
@@ -318,7 +319,7 @@ module Kitchen
|
|
318
319
|
info "Setting up SSH access for key <#{config[:public_key_path]}>"
|
319
320
|
ssh = Fog::SSH.new(state[:hostname],
|
320
321
|
config[:username],
|
321
|
-
password: server.password)
|
322
|
+
password: config[:password] || server.password)
|
322
323
|
pub_key = open(config[:public_key_path]).read
|
323
324
|
ssh.run([
|
324
325
|
%(mkdir .ssh),
|
@@ -1033,24 +1033,33 @@ describe Kitchen::Driver::Openstack do
|
|
1033
1033
|
let(:server) { double(password: 'aloha') }
|
1034
1034
|
let(:state) { { hostname: 'host' } }
|
1035
1035
|
let(:read) { double(read: 'a_key') }
|
1036
|
-
let(:ssh)
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1036
|
+
let(:ssh) { double(run: true) }
|
1037
|
+
|
1038
|
+
before(:each) do
|
1039
|
+
allow(driver).to receive(:open).with(config[:public_key_path])
|
1040
|
+
.and_return(read)
|
1040
1041
|
end
|
1041
1042
|
|
1042
1043
|
it 'opens an SSH session to the server' do
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
res = driver.send(:do_ssh_setup, state, config, server)
|
1048
|
-
expected = [
|
1044
|
+
expect(Fog::SSH).to receive(:new).with(state[:hostname],
|
1045
|
+
'root',
|
1046
|
+
password: 'aloha').and_return(ssh)
|
1047
|
+
expect(ssh).to receive(:run).with([
|
1049
1048
|
'mkdir .ssh',
|
1050
1049
|
'echo "a_key" >> ~/.ssh/authorized_keys',
|
1051
1050
|
'passwd -l root'
|
1052
|
-
]
|
1053
|
-
|
1051
|
+
])
|
1052
|
+
driver.send(:do_ssh_setup, state, config, server)
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
context 'a configured SSH password' do
|
1056
|
+
let(:config) { super().merge(password: '12345') }
|
1057
|
+
|
1058
|
+
it 'uses the configured password' do
|
1059
|
+
expect(Fog::SSH).to receive(:new)
|
1060
|
+
.with(state[:hostname], 'root', password: '12345').and_return(ssh)
|
1061
|
+
driver.send(:do_ssh_setup, state, config, server)
|
1062
|
+
end
|
1054
1063
|
end
|
1055
1064
|
end
|
1056
1065
|
|
data/spec/spec_helper.rb
CHANGED
@@ -28,6 +28,8 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
28
28
|
SimpleCov::Formatter::Console
|
29
29
|
]
|
30
30
|
SimpleCov.minimum_coverage 90
|
31
|
-
SimpleCov.start
|
31
|
+
SimpleCov.start do
|
32
|
+
add_filter '/vendor/'
|
33
|
+
end
|
32
34
|
|
33
35
|
require_relative '../lib/kitchen/driver/openstack'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-openstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Hartman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
234
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.4.
|
235
|
+
rubygems_version: 2.4.5
|
236
236
|
signing_key:
|
237
237
|
specification_version: 4
|
238
238
|
summary: A Test Kitchen OpenStack Nova driver
|