kitchen-ec2 3.4.0 → 3.5.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
  SHA256:
3
- metadata.gz: d030685e23e784c93fd5e8c7f76702a4a90f907925a2a67750827ea6457af94f
4
- data.tar.gz: 5268e3ecbfb386c0a62a1f9f6e2867685e3e5d21376d490a1f5408f20d19db96
3
+ metadata.gz: 4591ccc89a7ed2c996442b609b0ef4fb96fb868e5d3512e4a3d4283d0b883b07
4
+ data.tar.gz: 1ba531086886fddc2f27f9e25843c94df565a5cd86f7b97562a026036709e51a
5
5
  SHA512:
6
- metadata.gz: 71cd818f465de9cf145592c6110481a8544e45a3e37c105149b122bc921a7d8ae2e11cd8b68816db453a2b4c969b87f1115d32b4e00624c5c3dee6f06cd47de7
7
- data.tar.gz: 30021e46d8151aa712224f810ea986ce28cabeffe65baeba885e5b86e261a38417775978b44d9b5cad08d2107b2be8a57e3cd8c23238cba9bc0fb3dbd48082ae
6
+ metadata.gz: 9703c6b265c6ab38ec111454b1a620cc8e395e7230316d9ee84e3b56c9a8a77aceffc2537cc1a560ea7c4be2599fa23fa0521cb6a781ac54ba7856eb8bd22bbe
7
+ data.tar.gz: 5727ade2a7a41f52e530b999c27198a67631925217c303681af2cef952e0a714e933138d4d475c3c224f148c20dd0abc080a9d0d2f43c65d27c583ffc555908a
@@ -56,8 +56,10 @@ module Kitchen
56
56
  ).subnets
57
57
  raise "The subnet tagged '#{config[:subnet_filter][:tag]}:#{config[:subnet_filter][:value]}' does not exist!" unless subnets.any?
58
58
 
59
- vpc_id = subnets[0].vpc_id
60
- config[:subnet_id] = subnets[0].subnet_id
59
+ # => Select the least-populated subnet if we have multiple matches
60
+ subnet = subnets.sort_by { |s| s[:available_ip_address_count] }.last
61
+ vpc_id = subnet.vpc_id
62
+ config[:subnet_id] = subnet.subnet_id
61
63
  end
62
64
 
63
65
  if config[:security_group_ids].nil? && config[:security_group_filter]
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
4
  #
5
- # Copyright:: 2016-2020, Chef Software, Inc.
5
+ # Copyright:: Chef Software, Inc.
6
6
  # Copyright:: 2012-2018, Fletcher Nichol
7
7
  #
8
8
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,6 +22,6 @@ module Kitchen
22
22
  module Driver
23
23
 
24
24
  # Version string for EC2 Test Kitchen driver
25
- EC2_VERSION = "3.4.0".freeze
25
+ EC2_VERSION = "3.5.0".freeze
26
26
  end
27
27
  end
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: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -168,14 +168,14 @@ dependencies:
168
168
  requirements:
169
169
  - - '='
170
170
  - !ruby/object:Gem::Version
171
- version: 0.14.1
171
+ version: 0.15.1
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
176
  - - '='
177
177
  - !ruby/object:Gem::Version
178
- version: 0.14.1
178
+ version: 0.15.1
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: climate_control
181
181
  requirement: !ruby/object:Gem::Requirement