kitchen-ec2 0.10.0 → 1.0.0.beta.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.
@@ -70,26 +70,6 @@ describe Kitchen::Driver::Ec2 do
70
70
  expect { driver.finalize_config!(instance) }.to \
71
71
  raise_error(Kitchen::UserError, /:aws_ssh_key_id/)
72
72
  end
73
-
74
- it "requires :image_id to be provided" do
75
- config[:aws_ssh_key_id] = "key"
76
- expect { driver.finalize_config!(instance) }.to \
77
- raise_error(Kitchen::UserError, /:image_id/)
78
- end
79
- end
80
-
81
- describe "#finalize_config!" do
82
- it "defaults the availability zone if not provided" do
83
- expect(config[:availability_zone]).to eq(nil)
84
- driver.finalize_config!(instance)
85
- expect(config[:availability_zone]).to eq("us-east-1b")
86
- end
87
-
88
- it "expands the availability zone if provided as a letter" do
89
- config[:availability_zone] = "d"
90
- driver.finalize_config!(instance)
91
- expect(config[:availability_zone]).to eq("us-east-1d")
92
- end
93
73
  end
94
74
 
95
75
  describe "#hostname" do
@@ -284,7 +264,9 @@ describe Kitchen::Driver::Ec2 do
284
264
  expect(server).to receive_message_chain("client.get_password_data").with(
285
265
  :instance_id => server_id
286
266
  ).and_return(data)
287
- expect(server).to receive(:decrypt_windows_password).with("foo").and_return(password)
267
+ expect(server).to receive(:decrypt_windows_password).
268
+ with(File.expand_path("foo")).
269
+ and_return(password)
288
270
  driver.fetch_windows_admin_password(server, state)
289
271
  end
290
272
 
@@ -326,10 +308,6 @@ describe Kitchen::Driver::Ec2 do
326
308
  let(:server) { double("aws server object", :id => id) }
327
309
  let(:id) { "i-12345" }
328
310
 
329
- before do
330
- expect(driver).to receive(:copy_deprecated_configs).with(state)
331
- end
332
-
333
311
  it "returns if the instance is already created" do
334
312
  state[:server_id] = id
335
313
  expect(driver.create(state)).to eq(nil)
@@ -337,10 +315,8 @@ describe Kitchen::Driver::Ec2 do
337
315
 
338
316
  shared_examples "common create" do
339
317
  it "successfully creates and tags the instance" do
340
- expect(actual_client).to receive(:wait_until).with(
341
- :instance_exists,
342
- :instance_ids => [server.id]
343
- )
318
+ expect(server).to receive(:wait_until_exists)
319
+ expect(driver).to receive(:update_username)
344
320
  expect(driver).to receive(:tag_server).with(server)
345
321
  expect(driver).to receive(:wait_until_ready).with(server, state)
346
322
  expect(transport).to receive_message_chain("connection.wait_until_ready")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 1.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -72,6 +72,20 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '2'
75
+ - !ruby/object:Gem::Dependency
76
+ name: retryable
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '2.0'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.0'
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: rspec
77
91
  requirement: !ruby/object:Gem::Requirement
@@ -187,13 +201,21 @@ files:
187
201
  - LICENSE
188
202
  - README.md
189
203
  - Rakefile
190
- - data/amis.json
191
204
  - kitchen-ec2.gemspec
192
205
  - lib/kitchen/driver/aws/client.rb
193
206
  - lib/kitchen/driver/aws/instance_generator.rb
207
+ - lib/kitchen/driver/aws/standard_platform.rb
208
+ - lib/kitchen/driver/aws/standard_platform/centos.rb
209
+ - lib/kitchen/driver/aws/standard_platform/debian.rb
210
+ - lib/kitchen/driver/aws/standard_platform/fedora.rb
211
+ - lib/kitchen/driver/aws/standard_platform/freebsd.rb
212
+ - lib/kitchen/driver/aws/standard_platform/rhel.rb
213
+ - lib/kitchen/driver/aws/standard_platform/ubuntu.rb
214
+ - lib/kitchen/driver/aws/standard_platform/windows.rb
194
215
  - lib/kitchen/driver/ec2.rb
195
216
  - lib/kitchen/driver/ec2_version.rb
196
217
  - spec/kitchen/driver/ec2/client_spec.rb
218
+ - spec/kitchen/driver/ec2/image_selection_spec.rb
197
219
  - spec/kitchen/driver/ec2/instance_generator_spec.rb
198
220
  - spec/kitchen/driver/ec2_spec.rb
199
221
  - spec/spec_helper.rb
@@ -212,17 +234,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
212
234
  version: '0'
213
235
  required_rubygems_version: !ruby/object:Gem::Requirement
214
236
  requirements:
215
- - - ">="
237
+ - - ">"
216
238
  - !ruby/object:Gem::Version
217
- version: '0'
239
+ version: 1.3.1
218
240
  requirements: []
219
241
  rubyforge_project:
220
- rubygems_version: 2.4.7
242
+ rubygems_version: 2.4.5.1
221
243
  signing_key:
222
244
  specification_version: 4
223
245
  summary: A Test Kitchen Driver for Amazon EC2
224
246
  test_files:
225
247
  - spec/kitchen/driver/ec2/client_spec.rb
248
+ - spec/kitchen/driver/ec2/image_selection_spec.rb
226
249
  - spec/kitchen/driver/ec2/instance_generator_spec.rb
227
250
  - spec/kitchen/driver/ec2_spec.rb
228
251
  - spec/spec_helper.rb
@@ -1,118 +0,0 @@
1
- {
2
- "regions": {
3
- "ap-northeast-1": {
4
- "ubuntu-10.04": "ami-8326b382",
5
- "ubuntu-12.04": "ami-bb9a08ba",
6
- "ubuntu-12.10": "ami-4556c544",
7
- "ubuntu-13.04": "ami-97099a96",
8
- "ubuntu-13.10": "ami-45f1a744",
9
- "ubuntu-14.04": "ami-955c0c94",
10
- "centos-6.4": "ami-9ffa709e",
11
- "debian-7.1.0": "ami-f1f064f0",
12
- "windows-2012r2": "ami-28bc7428",
13
- "windows-2008r2": "ami-5ace065a"
14
- },
15
- "ap-southeast-1": {
16
- "ubuntu-10.04": "ami-34713866",
17
- "ubuntu-12.04": "ami-881c57da",
18
- "ubuntu-12.10": "ami-3ce0a86e",
19
- "ubuntu-13.04": "ami-4af5bd18",
20
- "ubuntu-13.10": "ami-02e6b850",
21
- "ubuntu-14.04": "ami-9a7c25c8",
22
- "centos-6.4": "ami-46f5bb14",
23
- "debian-7.1.0": "ami-fe8ac3ac",
24
- "windows-2012r2": "ami-062e1054",
25
- "windows-2008r2": "ami-30291762"
26
- },
27
- "ap-southeast-2": {
28
- "ubuntu-10.04": "ami-2f009315",
29
- "ubuntu-12.04": "ami-cb26b4f1",
30
- "ubuntu-12.10": "ami-1703912d",
31
- "ubuntu-13.04": "ami-8f32a0b5",
32
- "ubuntu-13.10": "ami-e54423df",
33
- "ubuntu-14.04": "ami-f3b1d6c9",
34
- "centos-6.4": "ami-9352c1a9",
35
- "debian-7.1.0": "ami-4e099a74",
36
- "windows-2012r2": "ami-6be19e51",
37
- "windows-2008r2": "ami-fdd8a7c7"
38
- },
39
- "eu-west-1": {
40
- "ubuntu-10.04": "ami-bbadb0cf",
41
- "ubuntu-12.04": "ami-d3b5aea7",
42
- "ubuntu-12.10": "ami-6b62791f",
43
- "ubuntu-13.04": "ami-6fd4cf1b",
44
- "ubuntu-13.10": "ami-39eb3f4e",
45
- "ubuntu-14.04": "ami-c112c5b6",
46
- "centos-6.4": "ami-75190b01",
47
- "debian-7.1.0": "ami-954559e1",
48
- "windows-2012r2": "ami-1387ed64",
49
- "windows-2008r2": "ami-1b97fd6c"
50
- },
51
- "sa-east-1": {
52
- "ubuntu-10.04": "ami-962c898b",
53
- "ubuntu-12.04": "ami-c905a1d4",
54
- "ubuntu-12.10": "ami-e759fdfa",
55
- "ubuntu-13.04": "ami-4b2b8f56",
56
- "ubuntu-13.10": "ami-076cc21a",
57
- "ubuntu-14.04": "ami-052b8518",
58
- "centos-6.4": "ami-a665c0bb",
59
- "debian-7.1.0": "ami-b03590ad",
60
- "windows-2012r2": "ami-7929ae64",
61
- "windows-2008r2": "ami-9331b68e"
62
- },
63
- "us-east-1": {
64
- "ubuntu-10.04": "ami-1ab3ce73",
65
- "ubuntu-12.04": "ami-2f115c46",
66
- "ubuntu-12.10": "ami-4d5b1824",
67
- "ubuntu-13.04": "ami-a73371ce",
68
- "ubuntu-13.10": "ami-a65393ce",
69
- "ubuntu-14.04": "ami-4a915c22",
70
- "centos-6.4": "ami-bf5021d6",
71
- "debian-7.1.0": "ami-50d9a439",
72
- "windows-2012r2": "ami-c01102a8",
73
- "windows-2008r2": "ami-c8c0d3a0"
74
- },
75
- "us-west-1": {
76
- "ubuntu-10.04": "ami-848ba2c1",
77
- "ubuntu-12.04": "ami-eaf0daaf",
78
- "ubuntu-12.10": "ami-02220847",
79
- "ubuntu-13.04": "ami-fe052fbb",
80
- "ubuntu-13.10": "ami-bb2a2afe",
81
- "ubuntu-14.04": "ami-d99a9a9c",
82
- "centos-6.4": "ami-5d456c18",
83
- "debian-7.1.0": "ami-1a9bb25f",
84
- "windows-2012r2": "ami-830ee0c7",
85
- "windows-2008r2": "ami-af04eaeb"
86
- },
87
- "us-west-2": {
88
- "ubuntu-10.04": "ami-f19407c1",
89
- "ubuntu-12.04": "ami-e6f36fd6",
90
- "ubuntu-12.10": "ami-0c069b3c",
91
- "ubuntu-13.04": "ami-4ade427a",
92
- "ubuntu-13.10": "ami-c18ff1f1",
93
- "ubuntu-14.04": "ami-b7720b87",
94
- "centos-6.4": "ami-b3bf2f83",
95
- "debian-7.1.0": "ami-158a1925",
96
- "windows-2012r2": "ami-c30a39f3",
97
- "windows-2008r2": "ami-adf8cb9d"
98
- }
99
- },
100
- "usernames": {
101
- "ubuntu-10.04": "ubuntu",
102
- "ubuntu-12.04": "ubuntu",
103
- "ubuntu-12.10": "ubuntu",
104
- "ubuntu-13.04": "ubuntu",
105
- "ubuntu-13.10": "ubuntu",
106
- "ubuntu-14.04": "ubuntu",
107
- "centos-6.4": "root",
108
- "debian-7.1.0": "admin",
109
- "windows-2008r2": "administrator",
110
- "windows-2012r2": "administrator"
111
- },
112
- "references": {
113
- "ubuntu": "http://uec-images.ubuntu.com/query/",
114
- "debian": "https://wiki.debian.org/Cloud/AmazonEC2Image",
115
- "centos": "http://wiki.centos.org/Cloud/AWS",
116
- "windows": "http://aws.amazon.com/windows/"
117
- }
118
- }