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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f0c6d5939b2b9746736495364e17e8cd781537e
4
- data.tar.gz: c2485ae2cfb6f704347c4d5a68987e69082ac6cb
3
+ metadata.gz: 75171e28c81d598d40a16d96c60129fb1fa6b622
4
+ data.tar.gz: 366167a8087a3c5181b64bc6aeee60109529185f
5
5
  SHA512:
6
- metadata.gz: f88248b733bfae4edca7d5257c5a52cb6394e2384fcc8e8b69ec688c44ebaa461a82512bd306eae78f6f7071eb1ddc70425f8f1cc198993e658100b93bc7d957
7
- data.tar.gz: dfd891bbb1932b95605e53bafc60c62cb9735ec6d14caabf2f51ec888b14acfe15cf0de36077086c3b1f7935169dc2719fb1515879a6e11cc80c7620f30f31fd
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
@@ -1,6 +1,6 @@
1
1
  Author:: Jonathan Hartman (<j@p4nt5.com>)
2
2
 
3
- Copyright (c) 2013-2014 Jonathan Hartman
3
+ Copyright (c) 2013-2015 Jonathan Hartman
4
4
 
5
5
  Licensed under the Apache License, Version 2.0 (the "License");
6
6
  you may not use this file except in compliance with the License.
data/Rakefile CHANGED
@@ -19,4 +19,4 @@ end
19
19
 
20
20
  RSpec::Core::RakeTask.new(:spec)
21
21
 
22
- task :default => [ :cane, :rubocop, :loc, :spec ]
22
+ task default: [:cane, :rubocop, :loc, :spec]
data/data/images.json CHANGED
@@ -1,62 +1,52 @@
1
1
  {
2
- "arch": "df924994-b686-449a-86e3-1876998022aa",
3
- "arch-2014": "df924994-b686-449a-86e3-1876998022aa",
4
- "arch-2014.10": "df924994-b686-449a-86e3-1876998022aa",
5
- "centos": "bfa5783c-e40e-4668-adc1-feb0ae3d7a46",
6
- "centos-7": "bfa5783c-e40e-4668-adc1-feb0ae3d7a46",
7
- "centos-7.0": "bfa5783c-e40e-4668-adc1-feb0ae3d7a46",
8
- "centos-6": "7e746552-2212-41d7-b216-a1024b83b0c4",
9
- "centos-6.5": "7e746552-2212-41d7-b216-a1024b83b0c4",
10
- "centos-5": "e0748e2d-569f-4ea6-85ad-fe559991db57",
11
- "centos-5.11": "e0748e2d-569f-4ea6-85ad-fe559991db57",
12
- "coreos": "749dc22a-9563-4628-b0d1-f84ced8c7b7a",
13
- "coreos-stable": "749dc22a-9563-4628-b0d1-f84ced8c7b7a",
14
- "coreos-beta": "0c9c575e-6af8-4acd-96b0-c04ff0184718",
15
- "coreos-alpha": "a7fd10a0-cb13-400e-9fb8-a3d488f658c3",
16
- "debian": "b279d8e6-1cbd-4e7c-875a-f6dbffc4c4a0",
17
- "debian-7": "b279d8e6-1cbd-4e7c-875a-f6dbffc4c4a0",
18
- "debian-7.6": "b279d8e6-1cbd-4e7c-875a-f6dbffc4c4a0",
19
- "debian-6": "7c0fe28a-6e29-4049-83bf-b8ac57608736",
20
- "debian-6.0.10": "7c0fe28a-6e29-4049-83bf-b8ac57608736",
21
- "debian-testing": "86bdc5c5-8f2d-4029-afd1-3a26ccdeb2c4",
22
- "debian-unstable": "14d79a15-6c9a-4a67-8943-06de0989df2a",
23
- "fedora": "ea98e34c-7a25-4670-9e2a-7fa9815f6c9f",
24
- "fedora-21": "ea98e34c-7a25-4670-9e2a-7fa9815f6c9f",
25
- "fedora-20": "89cd53af-82fa-484f-a900-366e0f20996f",
26
- "fedora-19": "beb060e2-63f4-4cbc-b2a6-4b0b7d0edc9d",
27
- "freebsd": "fd3b2ce4-b2a5-4b4b-81f3-cd4dfc2e0555",
28
- "freebsd-10": "fd3b2ce4-b2a5-4b4b-81f3-cd4dfc2e0555",
29
- "freebsd-10.0": "fd3b2ce4-b2a5-4b4b-81f3-cd4dfc2e0555",
30
- "gentoo": "26c630fe-ba65-4cd2-ad69-1d808766a54b",
31
- "gentoo-14": "26c630fe-ba65-4cd2-ad69-1d808766a54b",
32
- "gentoo-14.4": "26c630fe-ba65-4cd2-ad69-1d808766a54b",
33
- "opensuse": "59addab2-1551-4949-b635-bc88f1b6dc7c",
34
- "opensuse-13": "59addab2-1551-4949-b635-bc88f1b6dc7c",
35
- "opensuse-13.1": "59addab2-1551-4949-b635-bc88f1b6dc7c",
36
- "redhat": "ceb5d3d9-5879-4b30-a3d6-9175127d94ac",
37
- "redhat-6": "ceb5d3d9-5879-4b30-a3d6-9175127d94ac",
38
- "redhat-6.6": "ceb5d3d9-5879-4b30-a3d6-9175127d94ac",
39
- "redhat-5": "e3015c6f-0103-4bb0-a6ca-59d619f9b645",
40
- "redhat-5.11": "e3015c6f-0103-4bb0-a6ca-59d619f9b645",
41
- "scientific": "3144cbba-af91-45c8-b7e4-6fa400369cad",
42
- "scientific-6": "3144cbba-af91-45c8-b7e4-6fa400369cad",
43
- "scientific-6.5": "3144cbba-af91-45c8-b7e4-6fa400369cad",
44
- "ubuntu": "0766e5df-d60a-4100-ae8c-07f27ec0148f",
45
- "ubuntu-14": "0766e5df-d60a-4100-ae8c-07f27ec0148f",
46
- "ubuntu-14.10": "0766e5df-d60a-4100-ae8c-07f27ec0148f",
47
- "ubuntu-14.04": "598a4282-f14b-4e50-af4c-b3e52749d9f9",
48
- "ubuntu-12": "a3da5530-71c6-4405-b64f-fd2da99d303c",
49
- "ubuntu-12.04": "a3da5530-71c6-4405-b64f-fd2da99d303c",
50
- "ubuntu-10": "0f4a93c6-a08c-4cf3-9fec-abe968f06892",
51
- "ubuntu-10.04": "0f4a93c6-a08c-4cf3-9fec-abe968f06892",
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
  }
@@ -5,31 +5,31 @@ require 'fog'
5
5
  require 'json'
6
6
 
7
7
  i_care_about = {
8
- 'Arch 2014.10 (PVHVM)' => %w(arch arch-2014 arch-2014.10),
9
- 'CentOS 7 (PVHVM)' => %w(centos centos-7 centos-7.0),
10
- 'CentOS 6.5 (PVHVM)' => %w(centos-6 centos-6.5),
11
- 'CentOS 5.11' => %w(centos-5 centos-5.11),
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 debian-7.6),
16
- 'Debian 6 (Squeeze)' => %w(debian-6 debian-6.0.10),
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
- "Fedora 19 (Schrodinger's Cat) (PVHVM)" => %w(fedora-19),
22
- 'FreeBSD 10.0' => %w(freebsd freebsd-10 freebsd-10.0),
23
- 'Gentoo 14.4 (PVHVM)' => %w(gentoo gentoo-14 gentoo-14.4),
24
- 'OpenSUSE 13.1 (PVHVM)' => %w(opensuse opensuse-13 opensuse-13.1),
25
- 'Red Hat Enterprise Linux 6.6 (PVHVM)' => %w(redhat redhat-6 redhat-6.6),
26
- 'Red Hat Enterprise Linux 5.11' => %w(redhat-5 redhat-5.11),
27
- 'Scientific Linux 6.5 (PVHVM)' => %w(scientific scientific-6 scientific-6.5),
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
- 'Ubuntu 10.04 LTS (Lucid Lynx)' => %w(ubuntu-10 ubuntu-10.04),
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
@@ -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 = ['j@p4nt5.com']
12
- spec.description = %q{A Test Kitchen Rackspace driver}
13
- spec.summary = spec.description
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(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ['lib']
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-2014, Jonathan Hartman
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-2014, Jonathan Hartman
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.14.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) do
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' => 'a3da5530-71c6-4405-b64f-fd2da99d303c',
124
- 'ubuntu-12' => 'a3da5530-71c6-4405-b64f-fd2da99d303c',
125
- 'ubuntu' => '0766e5df-d60a-4100-ae8c-07f27ec0148f',
126
- 'centos-5.11' => 'e0748e2d-569f-4ea6-85ad-fe559991db57',
127
- 'centos-5' => 'e0748e2d-569f-4ea6-85ad-fe559991db57',
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
- let(:driver) do
193
- config[:wait_for] = '1200'
194
- d = Kitchen::Driver::Rackspace.new(config)
195
- d.instance = instance
196
- allow(d).to receive(:default_name).and_return('a_monkey!')
197
- allow(d).to receive(:create_server).and_return(server)
198
- allow(d).to receive(:tcp_check).and_return(true)
199
- d
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
- let(:driver) do
234
- d = Kitchen::Driver::Rackspace.new(config)
235
- allow(d).to receive(:create_server).and_raise(Fog::Errors::Error,
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
- let(:driver) do
256
- d = Kitchen::Driver::Rackspace.new(config)
257
- d.instance = instance
258
- allow(d).to receive(:default_name).and_return('a_monkey!')
259
- allow(d).to receive(:create_server).and_return(server)
260
- allow(d).to receive(:tcp_check).and_return(true)
261
- d
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
- let(:driver) do
314
- d = Kitchen::Driver::Rackspace.new(config)
315
- d.instance = instance
316
- allow(d).to receive(:default_name).and_return('a_monkey!')
317
- allow(d).to receive(:create_server).and_return(server)
318
- allow(d).to receive(:tcp_check).and_return(true)
319
- d
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
- let(:driver) do
358
- d = Kitchen::Driver::Rackspace.new(config)
359
- d.instance = instance
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
- let(:driver) do
391
- d = Kitchen::Driver::Rackspace.new(config)
392
- d.instance = instance
393
- allow(d).to receive(:compute).and_return(compute)
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
- let(:driver) do
465
- d = Kitchen::Driver::Rackspace.new(config)
466
- d.instance = instance
467
- allow(d).to receive(:compute).and_return(compute)
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(:servers_double) { double('servers', bootstrap: server) }
483
- let(:compute_double) { double(Fog::Compute, servers: servers_double) }
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.create(state)
503
- expect(servers_double).to have_received(:bootstrap) do |arg|
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.14.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: 2014-12-10 00:00:00.000000000 Z
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: '0'
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: '0'
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.1
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