kitchen-ec2 1.3.0 → 1.3.1

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: b0d06c5717fea6db5e691129f2e7b2c29126ad83
4
- data.tar.gz: 9fe52faf85c23d960c618c26fdd28145a2a1f761
3
+ metadata.gz: e772e13d96b458409e81904073e8ac53a4434ad9
4
+ data.tar.gz: 01ea81d610958ca18980e7337e493d5ace671c6b
5
5
  SHA512:
6
- metadata.gz: acdc60d833d8c93b17eb73914e207101c8d5cd22945857155e70ad91f99586418f434929039c61fdba6252a73f60f179733b2a67d66f31eff934a9904b143e4f
7
- data.tar.gz: be0377db0b71c4e76ebecde7310c572d4081530eee5256d4d6c0c17a8eab2e2d76413797a3f293b5580230c4779928f19f2c808bd15c3062390e7fbc53d56657
6
+ metadata.gz: a9ef13fb42276855ee21b4c7a5f791200ae20dcb550f1c630ecbf9e5cf978c61e61836b5da227e8f23f9ef48aa7075ff0e342e37acb074f8250a25cc9cf84aee
7
+ data.tar.gz: 4291d7c0e8c1f6cb3286fb111a00d4b21ac3a24455cfe1af5980a31ae386d3afb4bf12f36d717e659547a36daceee1dd739c0221ea3291c4fe4ea096e736cb31
@@ -1,6 +1,19 @@
1
1
  # Change Log
2
2
 
3
- ## [v1.3.0](https://github.com/test-kitchen/kitchen-ec2/tree/v1.3.0) (2017-02-10)
3
+ ## [v1.3.1](https://github.com/test-kitchen/kitchen-ec2/tree/v1.3.1) (2017-02-16)
4
+ [Full Changelog](https://github.com/test-kitchen/kitchen-ec2/compare/v1.3.0...v1.3.1)
5
+
6
+ **Closed issues:**
7
+
8
+ - Shared AWS credentials file being ignored. [\#295](https://github.com/test-kitchen/kitchen-ec2/issues/295)
9
+ - Missing AMI generates Nil::NilClass error [\#284](https://github.com/test-kitchen/kitchen-ec2/issues/284)
10
+ - `kitchen converge` failing - not prioritizing env vars over ~/.aws/credentials [\#258](https://github.com/test-kitchen/kitchen-ec2/issues/258)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - reinstate default shared creds option [\#296](https://github.com/test-kitchen/kitchen-ec2/pull/296) ([davidcpell](https://github.com/davidcpell))
15
+
16
+ ## [v1.3.0](https://github.com/test-kitchen/kitchen-ec2/tree/v1.3.0) (2017-02-11)
4
17
  [Full Changelog](https://github.com/test-kitchen/kitchen-ec2/compare/v1.2.0...v1.3.0)
5
18
 
6
19
  **Implemented Enhancements:**
@@ -71,6 +71,8 @@ module Kitchen
71
71
  )
72
72
  elsif profile_name
73
73
  ::Aws::SharedCredentials.new(:profile_name => profile_name)
74
+ elsif default_shared_credentials?
75
+ ::Aws::SharedCredentials.new
74
76
  else
75
77
  ::Aws::InstanceProfileCredentials.new(:retries => 1)
76
78
  end
@@ -91,8 +93,8 @@ module Kitchen
91
93
  end
92
94
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
93
95
 
94
- def self.get_shared_creds(profile_name)
95
- ::Aws::SharedCredentials.new(:profile_name => profile_name)
96
+ def self.default_shared_credentials?
97
+ ::Aws::SharedCredentials.new.loadable?
96
98
  rescue ::Aws::Errors::NoSuchProfileError
97
99
  false
98
100
  end
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for EC2 Test Kitchen driver
24
- EC2_VERSION = "1.3.0"
24
+ EC2_VERSION = "1.3.1"
25
25
  end
26
26
  end
@@ -25,7 +25,7 @@ describe Kitchen::Driver::Aws::Client do
25
25
  it "loads IAM credentials last" do
26
26
  iam = instance_double(Aws::InstanceProfileCredentials)
27
27
 
28
- allow(Kitchen::Driver::Aws::Client).to receive(:get_shared_creds).and_return(false)
28
+ allow(Kitchen::Driver::Aws::Client).to receive(:default_shared_credentials?).and_return(false)
29
29
  allow(Aws::InstanceProfileCredentials).to receive(:new).and_return(iam)
30
30
 
31
31
  env_creds(nil, nil) do
@@ -33,7 +33,20 @@ describe Kitchen::Driver::Aws::Client do
33
33
  end
34
34
  end
35
35
 
36
- it "loads the shared credentials file second to last" do
36
+ it "loads the default shared creds profile second to last" do
37
+ shared = instance_double(Aws::SharedCredentials)
38
+
39
+ allow(Kitchen::Driver::Aws::Client).to receive(:default_shared_credentials?).and_return(true)
40
+ allow(Aws::SharedCredentials).to \
41
+ receive(:new).and_return(shared)
42
+
43
+ env_creds(nil, nil) do
44
+ expect(Kitchen::Driver::Aws::Client.get_credentials(nil, nil, nil, nil, nil)).to \
45
+ eq(shared)
46
+ end
47
+ end
48
+
49
+ it "loads a custom shared credentials profile third to last" do
37
50
  shared = instance_double(Aws::SharedCredentials)
38
51
 
39
52
  allow(Aws::SharedCredentials).to \
@@ -103,6 +116,8 @@ describe Kitchen::Driver::Aws::Client do
103
116
 
104
117
  # nothing else is set, so we default to this
105
118
  it "loads an Instance Profile last" do
119
+ allow(Kitchen::Driver::Aws::Client).to receive(:default_shared_credentials?).and_return(false)
120
+
106
121
  expect(Aws::InstanceProfileCredentials).to \
107
122
  receive(:new).and_return(iam)
108
123
  expect(Aws::STS::Client).to \
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: 1.3.0
4
+ version: 1.3.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: 2017-02-11 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen