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 +4 -4
- data/CHANGELOG.md +14 -1
- data/lib/kitchen/driver/aws/client.rb +4 -2
- data/lib/kitchen/driver/ec2_version.rb +1 -1
- data/spec/kitchen/driver/ec2/client_spec.rb +17 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e772e13d96b458409e81904073e8ac53a4434ad9
|
4
|
+
data.tar.gz: 01ea81d610958ca18980e7337e493d5ace671c6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9ef13fb42276855ee21b4c7a5f791200ae20dcb550f1c630ecbf9e5cf978c61e61836b5da227e8f23f9ef48aa7075ff0e342e37acb074f8250a25cc9cf84aee
|
7
|
+
data.tar.gz: 4291d7c0e8c1f6cb3286fb111a00d4b21ac3a24455cfe1af5980a31ae386d3afb4bf12f36d717e659547a36daceee1dd739c0221ea3291c4fe4ea096e736cb31
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v1.3.
|
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.
|
95
|
-
::Aws::SharedCredentials.new
|
96
|
+
def self.default_shared_credentials?
|
97
|
+
::Aws::SharedCredentials.new.loadable?
|
96
98
|
rescue ::Aws::Errors::NoSuchProfileError
|
97
99
|
false
|
98
100
|
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(:
|
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
|
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.
|
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
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|