kitchen-rackspace 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/data/images.json +50 -60
- data/helpers/dump_image_list.rb +15 -15
- data/kitchen-rackspace.gemspec +16 -18
- data/lib/kitchen/driver/rackspace.rb +1 -1
- data/lib/kitchen/driver/rackspace_version.rb +2 -2
- data/spec/kitchen/driver/rackspace_spec.rb +61 -80
- data/spec/spec_helper.rb +0 -17
- metadata +40 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75171e28c81d598d40a16d96c60129fb1fa6b622
|
4
|
+
data.tar.gz: 366167a8087a3c5181b64bc6aeee60109529185f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9c7c188385aec74d5ba2c645b1c4224c0c1ed09a01495a3db47aadfe966a061100abc523155adfe3e23eb8ffd8bb0ce75e2444f258da8710a2b3523a0cbbfe3
|
7
|
+
data.tar.gz: 57e971463638d227f14219c9834110e1d392077e8251793c7d66684039ff1d69b4bb94c890fe10e27852c2154fb9f2d804bc162786073c67273bce15c024ebd8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.15.0 / 2015-04-02
|
2
|
+
|
3
|
+
* PR [#48][] - Drop references to retired Ubuntu 10.04 image
|
4
|
+
* PR [#46][] - Update all image IDs, add Scientific 7, remove references to
|
5
|
+
point releases that Rackspace no longer uses in image names; via [@martinb3][]
|
6
|
+
|
1
7
|
# 0.14.0 / 2014-12-09
|
2
8
|
|
3
9
|
* PR [#45][] - Add Ubuntu 14.10 and Fedora 21
|
@@ -118,6 +124,8 @@ boot times, via [@coderanger][]
|
|
118
124
|
|
119
125
|
* Initial release! Woo!
|
120
126
|
|
127
|
+
[#48]: https://github.com/test-kitchen/kitchen-rackspace/pull/48
|
128
|
+
[#46]: https://github.com/test-kitchen/kitchen-rackspace/pull/46
|
121
129
|
[#45]: https://github.com/test-kitchen/kitchen-rackspace/pull/45
|
122
130
|
[#44]: https://github.com/test-kitchen/kitchen-rackspace/pull/44
|
123
131
|
[#43]: https://github.com/test-kitchen/kitchen-rackspace/pull/43
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
data/data/images.json
CHANGED
@@ -1,62 +1,52 @@
|
|
1
1
|
{
|
2
|
-
"arch": "
|
3
|
-
"arch-
|
4
|
-
"arch-
|
5
|
-
"centos": "
|
6
|
-
"centos-7": "
|
7
|
-
"centos-
|
8
|
-
"centos-
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"coreos": "
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"debian": "
|
17
|
-
"debian-
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"vyatta": "55639bdb-b812-4500-b82c-6f1a063dff83",
|
53
|
-
"vyatta-6": "55639bdb-b812-4500-b82c-6f1a063dff83",
|
54
|
-
"vyatta-6.7": "55639bdb-b812-4500-b82c-6f1a063dff83",
|
55
|
-
"vyatta-6.7R4": "55639bdb-b812-4500-b82c-6f1a063dff83",
|
56
|
-
"windows": "8104c744-e3f8-4544-8695-cf7244792e1d",
|
57
|
-
"windows-2012": "8104c744-e3f8-4544-8695-cf7244792e1d",
|
58
|
-
"windows-2012R2": "8104c744-e3f8-4544-8695-cf7244792e1d",
|
59
|
-
"windows-2008": "85533cc6-6776-460c-a5f5-b9b0c7ed915d",
|
60
|
-
"windows-2008R2": "85533cc6-6776-460c-a5f5-b9b0c7ed915d",
|
61
|
-
"windows-2008R2SP1": "85533cc6-6776-460c-a5f5-b9b0c7ed915d"
|
2
|
+
"arch": "ac58054a-9287-4421-89a4-bbcb481258d7",
|
3
|
+
"arch-2015": "ac58054a-9287-4421-89a4-bbcb481258d7",
|
4
|
+
"arch-2015.3": "ac58054a-9287-4421-89a4-bbcb481258d7",
|
5
|
+
"centos": "0af7334f-c22a-4c24-906b-950b8ef51a86",
|
6
|
+
"centos-7": "0af7334f-c22a-4c24-906b-950b8ef51a86",
|
7
|
+
"centos-6": "a4a82b28-c5a8-49e3-b31a-db289dcac0f8",
|
8
|
+
"centos-5": "922e9afc-ebe4-43e6-8eaf-c555cf7f8cd6",
|
9
|
+
"coreos": "c412af3b-f9a6-4ad1-a9e9-4aabca8073d3",
|
10
|
+
"coreos-stable": "c412af3b-f9a6-4ad1-a9e9-4aabca8073d3",
|
11
|
+
"coreos-beta": "981f0a5f-5f09-4b71-9372-6aa9fe1a68ac",
|
12
|
+
"coreos-alpha": "378195c3-d10c-43dc-a4a7-661195dab075",
|
13
|
+
"debian": "04399432-ac55-4e0b-bcd1-6c90fa568a0f",
|
14
|
+
"debian-7": "04399432-ac55-4e0b-bcd1-6c90fa568a0f",
|
15
|
+
"debian-6": "076459d3-6a18-43d4-b8b1-653c2380f8cf",
|
16
|
+
"debian-testing": "272a02e6-13cf-4d04-b6e5-7d31001d5510",
|
17
|
+
"debian-unstable": "892b9bab-a11e-4d16-b4bd-ab9494ed7b78",
|
18
|
+
"fedora": "06c388fd-1906-43e0-93a7-eb1d1c6bb880",
|
19
|
+
"fedora-21": "06c388fd-1906-43e0-93a7-eb1d1c6bb880",
|
20
|
+
"fedora-20": "dccb6042-43a1-4c02-9b83-786a1cd27751",
|
21
|
+
"freebsd": "1711732b-dd3f-456d-9a99-6f93b8a6859e",
|
22
|
+
"freebsd-10": "1711732b-dd3f-456d-9a99-6f93b8a6859e",
|
23
|
+
"gentoo": "e871e91b-64b9-478e-afaf-b0e3d9fb765a",
|
24
|
+
"gentoo-15": "e871e91b-64b9-478e-afaf-b0e3d9fb765a",
|
25
|
+
"gentoo-15.1": "e871e91b-64b9-478e-afaf-b0e3d9fb765a",
|
26
|
+
"opensuse": "bf7b0aed-1227-439c-9845-2e06078f6e81",
|
27
|
+
"opensuse-13": "bf7b0aed-1227-439c-9845-2e06078f6e81",
|
28
|
+
"opensuse-13.2": "bf7b0aed-1227-439c-9845-2e06078f6e81",
|
29
|
+
"redhat": "cecd0198-9e71-42eb-b577-353ed29fbd1c",
|
30
|
+
"redhat-7": "cecd0198-9e71-42eb-b577-353ed29fbd1c",
|
31
|
+
"redhat-6": "71fec3e5-ffbf-4f03-879c-ece0289bcac6",
|
32
|
+
"redhat-5": "fadbb733-931f-409d-bc45-e4b0dd0d252f",
|
33
|
+
"scientific": "76e4ee70-1770-4039-abe4-6fcff38deadc",
|
34
|
+
"scientific-7": "76e4ee70-1770-4039-abe4-6fcff38deadc",
|
35
|
+
"scientific-6": "a6fd6683-e2ce-4d72-8514-dbb67232cfee",
|
36
|
+
"ubuntu": "b50d9359-3669-4aee-be77-633c8f9386cf",
|
37
|
+
"ubuntu-14": "b50d9359-3669-4aee-be77-633c8f9386cf",
|
38
|
+
"ubuntu-14.10": "b50d9359-3669-4aee-be77-633c8f9386cf",
|
39
|
+
"ubuntu-14.04": "8226139f-3804-4ad6-a461-97ee034b2005",
|
40
|
+
"ubuntu-12": "fd1b9e98-21c5-43bb-89d7-bfc4ee3c5caf",
|
41
|
+
"ubuntu-12.04": "fd1b9e98-21c5-43bb-89d7-bfc4ee3c5caf",
|
42
|
+
"vyatta": "07c16842-db34-449a-90ac-e8f05dd8564e",
|
43
|
+
"vyatta-6": "07c16842-db34-449a-90ac-e8f05dd8564e",
|
44
|
+
"vyatta-6.7": "07c16842-db34-449a-90ac-e8f05dd8564e",
|
45
|
+
"vyatta-6.7R6": "07c16842-db34-449a-90ac-e8f05dd8564e",
|
46
|
+
"windows": "7bd254bc-e9d9-4e37-b27e-e94c04fad2f1",
|
47
|
+
"windows-2012": "7bd254bc-e9d9-4e37-b27e-e94c04fad2f1",
|
48
|
+
"windows-2012R2": "7bd254bc-e9d9-4e37-b27e-e94c04fad2f1",
|
49
|
+
"windows-2008": "90aae3ae-6b5a-462f-8c11-66a3f77e7b0b",
|
50
|
+
"windows-2008R2": "90aae3ae-6b5a-462f-8c11-66a3f77e7b0b",
|
51
|
+
"windows-2008R2SP1": "90aae3ae-6b5a-462f-8c11-66a3f77e7b0b"
|
62
52
|
}
|
data/helpers/dump_image_list.rb
CHANGED
@@ -5,31 +5,31 @@ require 'fog'
|
|
5
5
|
require 'json'
|
6
6
|
|
7
7
|
i_care_about = {
|
8
|
-
'Arch
|
9
|
-
'CentOS 7 (PVHVM)' => %w(centos centos-7
|
10
|
-
'CentOS 6
|
11
|
-
'CentOS 5
|
8
|
+
'Arch 2015.3 (PVHVM)' => %w(arch arch-2015 arch-2015.3),
|
9
|
+
'CentOS 7 (PVHVM)' => %w(centos centos-7),
|
10
|
+
'CentOS 6 (PVHVM)' => %w(centos-6),
|
11
|
+
'CentOS 5 (PV)' => %w(centos-5),
|
12
12
|
'CoreOS (Stable)' => %w(coreos coreos-stable),
|
13
13
|
'CoreOS (Beta)' => %w(coreos-beta),
|
14
14
|
'CoreOS (Alpha)' => %w(coreos-alpha),
|
15
|
-
'Debian 7 (Wheezy) (PVHVM)' => %w(debian debian-7
|
16
|
-
'Debian 6 (Squeeze)' => %w(debian-6
|
15
|
+
'Debian 7 (Wheezy) (PVHVM)' => %w(debian debian-7),
|
16
|
+
'Debian 6 (Squeeze) (PV)' => %w(debian-6),
|
17
17
|
'Debian Testing (Jessie) (PVHVM)' => %w(debian-testing),
|
18
18
|
'Debian Unstable (Sid) (PVHVM)' => %w(debian-unstable),
|
19
19
|
'Fedora 21 (PVHVM)' => %w(fedora fedora-21),
|
20
20
|
'Fedora 20 (Heisenbug) (PVHVM)' => %w(fedora-20),
|
21
|
-
|
22
|
-
'
|
23
|
-
'
|
24
|
-
'
|
25
|
-
'Red Hat Enterprise Linux 6
|
26
|
-
'Red Hat Enterprise Linux 5
|
27
|
-
'Scientific Linux
|
21
|
+
'FreeBSD 10 (PVHVM)' => %w(freebsd freebsd-10),
|
22
|
+
'Gentoo 15.1 (PVHVM)' => %w(gentoo gentoo-15 gentoo-15.1),
|
23
|
+
'OpenSUSE 13.2 (PVHVM)' => %w(opensuse opensuse-13 opensuse-13.2),
|
24
|
+
'Red Hat Enterprise Linux 7 (PVHVM)' => %w(redhat redhat-7),
|
25
|
+
'Red Hat Enterprise Linux 6 (PVHVM)' => %w(redhat-6),
|
26
|
+
'Red Hat Enterprise Linux 5 (PV)' => %w(redhat-5),
|
27
|
+
'Scientific Linux 7 (PVHVM)' => %w(scientific scientific-7),
|
28
|
+
'Scientific Linux 6 (PVHVM)' => %w(scientific-6),
|
28
29
|
'Ubuntu 14.10 (Utopic Unicorn) (PVHVM)' => %w(ubuntu ubuntu-14 ubuntu-14.10),
|
29
30
|
'Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)' => %w(ubuntu-14.04),
|
30
31
|
'Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)' => %w(ubuntu-12 ubuntu-12.04),
|
31
|
-
'
|
32
|
-
'Vyatta Network OS 6.7R4' => %w(vyatta vyatta-6 vyatta-6.7 vyatta-6.7R4),
|
32
|
+
'Vyatta Network OS 6.7R6' => %w(vyatta vyatta-6 vyatta-6.7 vyatta-6.7R6),
|
33
33
|
'Windows Server 2012 R2' => %w(windows windows-2012 windows-2012R2),
|
34
34
|
'Windows Server 2008 R2 SP1' => %w(windows-2008
|
35
35
|
windows-2008R2
|
data/kitchen-rackspace.gemspec
CHANGED
@@ -8,31 +8,29 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = 'kitchen-rackspace'
|
9
9
|
spec.version = Kitchen::Driver::RACKSPACE_VERSION
|
10
10
|
spec.authors = ['Jonathan Hartman']
|
11
|
-
spec.email =
|
12
|
-
spec.description =
|
13
|
-
spec.summary =
|
11
|
+
spec.email = %w(j@p4nt5.com)
|
12
|
+
spec.description = 'A Test Kitchen Rackspace driver'
|
13
|
+
spec.summary = 'A Test Kitchen Rackspace driver built on Fog'
|
14
14
|
spec.homepage = 'https://github.com/test-kitchen/kitchen-rackspace'
|
15
15
|
spec.license = 'Apache'
|
16
16
|
|
17
|
-
spec.files = `git ls-files`.split(
|
18
|
-
spec.executables = spec.files.grep(
|
19
|
-
spec.test_files = spec.files.grep(
|
20
|
-
spec.require_paths =
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(/^(test|spec|features)\//)
|
20
|
+
spec.require_paths = %w(lib)
|
21
21
|
|
22
22
|
spec.required_ruby_version = '>= 1.9.3'
|
23
23
|
|
24
24
|
spec.add_dependency 'test-kitchen', '~> 1.1'
|
25
25
|
spec.add_dependency 'fog', '~> 1.18'
|
26
|
-
# Newer Fogs throw a warning if unf isn't there :(
|
27
|
-
spec.add_dependency 'unf'
|
28
26
|
|
29
|
-
spec.add_development_dependency 'bundler'
|
30
|
-
spec.add_development_dependency 'rake'
|
31
|
-
spec.add_development_dependency 'rubocop'
|
32
|
-
spec.add_development_dependency 'cane'
|
33
|
-
spec.add_development_dependency 'countloc'
|
34
|
-
spec.add_development_dependency 'rspec'
|
35
|
-
spec.add_development_dependency 'simplecov'
|
36
|
-
spec.add_development_dependency 'simplecov-console'
|
37
|
-
spec.add_development_dependency 'coveralls'
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.0'
|
28
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.29'
|
30
|
+
spec.add_development_dependency 'cane', '~> 2.6'
|
31
|
+
spec.add_development_dependency 'countloc', '~> 0.4'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
|
+
spec.add_development_dependency 'simplecov', '~> 0.9'
|
34
|
+
spec.add_development_dependency 'simplecov-console', '~> 0.2'
|
35
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
38
36
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
4
4
|
#
|
5
|
-
# Copyright (C) 2013-
|
5
|
+
# Copyright (C) 2013-2015, Jonathan Hartman
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
# you may not use this file except in compliance with the License.
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
4
4
|
#
|
5
|
-
# Copyright (C) 2013-
|
5
|
+
# Copyright (C) 2013-2015, Jonathan Hartman
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
# you may not use this file except in compliance with the License.
|
@@ -21,6 +21,6 @@ module Kitchen
|
|
21
21
|
#
|
22
22
|
# @author Jonathan Hartman <j@p4nt5.com>
|
23
23
|
module Driver
|
24
|
-
RACKSPACE_VERSION = '0.
|
24
|
+
RACKSPACE_VERSION = '0.15.0'
|
25
25
|
end
|
26
26
|
end
|
@@ -1,20 +1,4 @@
|
|
1
1
|
# Encoding: UTF-8
|
2
|
-
#
|
3
|
-
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
4
|
-
#
|
5
|
-
# Copyright (C) 2013-2014, Jonathan Hartman
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
2
|
|
19
3
|
require_relative '../../spec_helper'
|
20
4
|
|
@@ -41,13 +25,11 @@ describe Kitchen::Driver::Rackspace do
|
|
41
25
|
)
|
42
26
|
end
|
43
27
|
|
44
|
-
let(:driver)
|
45
|
-
d = Kitchen::Driver::Rackspace.new(config)
|
46
|
-
d.instance = instance
|
47
|
-
d
|
48
|
-
end
|
28
|
+
let(:driver) { described_class.new(config) }
|
49
29
|
|
50
30
|
before(:each) do
|
31
|
+
allow_any_instance_of(described_class).to receive(:instance)
|
32
|
+
.and_return(instance)
|
51
33
|
ENV['RACKSPACE_USERNAME'] = 'user'
|
52
34
|
ENV['RACKSPACE_API_KEY'] = 'key'
|
53
35
|
end
|
@@ -120,12 +102,11 @@ describe Kitchen::Driver::Rackspace do
|
|
120
102
|
end
|
121
103
|
|
122
104
|
platforms = {
|
123
|
-
'ubuntu-12.04' => '
|
124
|
-
'ubuntu-12' => '
|
125
|
-
'ubuntu' => '
|
126
|
-
'centos-5
|
127
|
-
'centos
|
128
|
-
'centos' => 'bfa5783c-e40e-4668-adc1-feb0ae3d7a46'
|
105
|
+
'ubuntu-12.04' => 'fd1b9e98-21c5-43bb-89d7-bfc4ee3c5caf',
|
106
|
+
'ubuntu-12' => 'fd1b9e98-21c5-43bb-89d7-bfc4ee3c5caf',
|
107
|
+
'ubuntu' => 'b50d9359-3669-4aee-be77-633c8f9386cf',
|
108
|
+
'centos-5' => '922e9afc-ebe4-43e6-8eaf-c555cf7f8cd6',
|
109
|
+
'centos' => '0af7334f-c22a-4c24-906b-950b8ef51a86'
|
129
110
|
}
|
130
111
|
platforms.each do |platform, id|
|
131
112
|
context "name is #{platform}" do
|
@@ -184,19 +165,21 @@ describe Kitchen::Driver::Rackspace do
|
|
184
165
|
end
|
185
166
|
|
186
167
|
describe '#create' do
|
168
|
+
let(:config) { super().merge(wait_for: '1200') }
|
187
169
|
let(:server) do
|
188
170
|
double(id: 'test123',
|
189
171
|
wait_for: true,
|
190
172
|
public_ip_address: '1.2.3.4')
|
191
173
|
end
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
174
|
+
|
175
|
+
before(:each) do
|
176
|
+
{
|
177
|
+
default_name: 'a_monkey!',
|
178
|
+
create_server: server,
|
179
|
+
tcp_check: true
|
180
|
+
}.each do |k, v|
|
181
|
+
allow_any_instance_of(described_class).to receive(k).and_return(v)
|
182
|
+
end
|
200
183
|
end
|
201
184
|
|
202
185
|
context 'username and API key only provided' do
|
@@ -230,11 +213,9 @@ describe Kitchen::Driver::Rackspace do
|
|
230
213
|
end
|
231
214
|
|
232
215
|
context 'a Fog error' do
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
'Uhoh')
|
237
|
-
d
|
216
|
+
before(:each) do
|
217
|
+
allow_any_instance_of(described_class).to receive(:create_server)
|
218
|
+
.and_raise(Fog::Errors::Error, 'Uhoh')
|
238
219
|
end
|
239
220
|
|
240
221
|
it 're-raises the error' do
|
@@ -252,13 +233,15 @@ describe Kitchen::Driver::Rackspace do
|
|
252
233
|
private_ip_address: '10.9.8.7',
|
253
234
|
update: nil)
|
254
235
|
end
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
236
|
+
|
237
|
+
before(:each) do
|
238
|
+
{
|
239
|
+
default_name: 'a_monkey!',
|
240
|
+
create_server: server,
|
241
|
+
tcp_check: true
|
242
|
+
}.each do |k, v|
|
243
|
+
allow_any_instance_of(described_class).to receive(k).and_return(v)
|
244
|
+
end
|
262
245
|
end
|
263
246
|
|
264
247
|
context 'username and API key only provided' do
|
@@ -310,13 +293,15 @@ describe Kitchen::Driver::Rackspace do
|
|
310
293
|
public_ip_address: '1.2.3.4',
|
311
294
|
private_ip_address: '10.9.8.7')
|
312
295
|
end
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
296
|
+
|
297
|
+
before(:each) do
|
298
|
+
{
|
299
|
+
default_name: 'a_monkey!',
|
300
|
+
create_server: server,
|
301
|
+
tcp_check: true
|
302
|
+
}.each do |k, v|
|
303
|
+
allow_any_instance_of(described_class).to receive(k).and_return(v)
|
304
|
+
end
|
320
305
|
end
|
321
306
|
|
322
307
|
context 'username and API key only provided' do
|
@@ -354,11 +339,9 @@ describe Kitchen::Driver::Rackspace do
|
|
354
339
|
let(:servers) { double(get: server) }
|
355
340
|
let(:compute) { double(servers: servers) }
|
356
341
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
allow(d).to receive(:compute).and_return(compute)
|
361
|
-
d
|
342
|
+
before(:each) do
|
343
|
+
allow_any_instance_of(described_class).to receive(:compute)
|
344
|
+
.and_return(compute)
|
362
345
|
end
|
363
346
|
|
364
347
|
context 'a live server that needs to be destroyed' do
|
@@ -387,11 +370,10 @@ describe Kitchen::Driver::Rackspace do
|
|
387
370
|
s
|
388
371
|
end
|
389
372
|
let(:compute) { double(servers: servers) }
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
d
|
373
|
+
|
374
|
+
before(:each) do
|
375
|
+
allow_any_instance_of(described_class).to receive(:compute)
|
376
|
+
.and_return(compute)
|
395
377
|
end
|
396
378
|
|
397
379
|
it 'does not try to destroy the server again' do
|
@@ -461,11 +443,10 @@ describe Kitchen::Driver::Rackspace do
|
|
461
443
|
s
|
462
444
|
end
|
463
445
|
let(:compute) { double(servers: servers) }
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
d
|
446
|
+
|
447
|
+
before(:each) do
|
448
|
+
allow_any_instance_of(described_class).to receive(:compute)
|
449
|
+
.and_return(compute)
|
469
450
|
end
|
470
451
|
|
471
452
|
it 'creates the server using a compute connection' do
|
@@ -479,16 +460,9 @@ describe Kitchen::Driver::Rackspace do
|
|
479
460
|
public_ip_address: '1.2.3.4')
|
480
461
|
end
|
481
462
|
let(:hostname) { 'example.com' }
|
482
|
-
let(:
|
483
|
-
let(:
|
463
|
+
let(:servers) { double('servers', bootstrap: server) }
|
464
|
+
let(:compute) { double(Fog::Compute, servers: servers) }
|
484
465
|
let(:state) { { server_id: server_id, hostname: hostname } }
|
485
|
-
let(:driver) do
|
486
|
-
d = Kitchen::Driver::Rackspace.new(config)
|
487
|
-
allow(d).to receive(:wait_for_sshd).with('1.2.3.4').and_return(true)
|
488
|
-
d.instance = instance
|
489
|
-
allow(Fog::Compute).to receive(:new).and_return(compute_double)
|
490
|
-
d
|
491
|
-
end
|
492
466
|
let(:user_specified_network) { 'bob_dole' }
|
493
467
|
let(:config) do
|
494
468
|
{
|
@@ -498,9 +472,16 @@ describe Kitchen::Driver::Rackspace do
|
|
498
472
|
networks: [user_specified_network]
|
499
473
|
}
|
500
474
|
end
|
475
|
+
|
476
|
+
before(:each) do
|
477
|
+
{ wait_for_sshd: true, compute: compute }.each do |k, v|
|
478
|
+
allow_any_instance_of(described_class).to receive(k).and_return(v)
|
479
|
+
end
|
480
|
+
end
|
481
|
+
|
501
482
|
it 'has the user specified network, plus default Rackspace networks' do
|
502
|
-
driver.
|
503
|
-
expect(
|
483
|
+
driver.send(:create_server)
|
484
|
+
expect(servers).to have_received(:bootstrap) do |arg|
|
504
485
|
expect(arg[:networks][2]).to eq user_specified_network
|
505
486
|
end
|
506
487
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,21 +1,4 @@
|
|
1
1
|
# Encoding: UTF-8
|
2
|
-
#
|
3
|
-
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
4
|
-
#
|
5
|
-
# Copyright (C) 2013-2014, Jonathan Hartman
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
2
|
|
20
3
|
require 'rspec'
|
21
4
|
require 'simplecov'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-rackspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
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-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -38,146 +38,132 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.18'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: unf
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: bundler
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- - "
|
45
|
+
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
47
|
+
version: '1.0'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- - "
|
52
|
+
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
54
|
+
version: '1.0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rake
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- - "
|
59
|
+
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
61
|
+
version: '10.0'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- - "
|
66
|
+
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
68
|
+
version: '10.0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rubocop
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- - "
|
73
|
+
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
75
|
+
version: '0.29'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- - "
|
80
|
+
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
82
|
+
version: '0.29'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: cane
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
87
|
+
- - "~>"
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
89
|
+
version: '2.6'
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
|
-
- - "
|
94
|
+
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
96
|
+
version: '2.6'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: countloc
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
|
-
- - "
|
101
|
+
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
103
|
+
version: '0.4'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
|
-
- - "
|
108
|
+
- - "~>"
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
110
|
+
version: '0.4'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: rspec
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
|
-
- - "
|
115
|
+
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
117
|
+
version: '3.0'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
|
-
- - "
|
122
|
+
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
124
|
+
version: '3.0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: simplecov
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- - "
|
129
|
+
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
131
|
+
version: '0.9'
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- - "
|
136
|
+
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
138
|
+
version: '0.9'
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: simplecov-console
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
|
-
- - "
|
143
|
+
- - "~>"
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
145
|
+
version: '0.2'
|
160
146
|
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
|
-
- - "
|
150
|
+
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
152
|
+
version: '0.2'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: coveralls
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
170
156
|
requirements:
|
171
|
-
- - "
|
157
|
+
- - "~>"
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
159
|
+
version: '0.8'
|
174
160
|
type: :development
|
175
161
|
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
|
-
- - "
|
164
|
+
- - "~>"
|
179
165
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
166
|
+
version: '0.8'
|
181
167
|
description: A Test Kitchen Rackspace driver
|
182
168
|
email:
|
183
169
|
- j@p4nt5.com
|
@@ -220,10 +206,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
206
|
version: '0'
|
221
207
|
requirements: []
|
222
208
|
rubyforge_project:
|
223
|
-
rubygems_version: 2.4.
|
209
|
+
rubygems_version: 2.4.5
|
224
210
|
signing_key:
|
225
211
|
specification_version: 4
|
226
|
-
summary: A Test Kitchen Rackspace driver
|
212
|
+
summary: A Test Kitchen Rackspace driver built on Fog
|
227
213
|
test_files:
|
228
214
|
- spec/kitchen/driver/rackspace_spec.rb
|
229
215
|
- spec/spec_helper.rb
|