kitchen-ec2 2.4.0 → 2.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: 817c9661208d141986f8c3472fd9a4b5bc4bcb6c7a290d7c400b99336c0b32a8
4
- data.tar.gz: a375e11a4dae0946170a813988df073550374d5b682de5f0d1fcc6e6356f4bb5
3
+ metadata.gz: 2b5b61ce04ba14b628c624fe6d1fdcbce3be710b2b2bb9f560309c1f2e49a6b0
4
+ data.tar.gz: fdf1eefb690ff096a6188c1149f479d626d5b93d1fbd2016876f1f422fa2823e
5
5
  SHA512:
6
- metadata.gz: 0b67befd11e0dfacf356ca1fe0bcb36a9d2cf26fa553312203771a77d4123ef7fa4718ef76ad152d0625b744edaa4c14f086303eef3bf59d7228df7187cac0df
7
- data.tar.gz: 7ee59275ba3647c4c1d7771e22da109a81258f813c3c45142aacf6e7a08ea2846b5cf67e26f2abb2e7c97960f2daa133858df839ae594685d6b5bc154676f131
6
+ metadata.gz: 5fc7e6be44b888c3b30def5287e992ff487aede57c450e10e8879c12cd45e66a1d565111844f6cb3f80dcea7462defee9b1d1fc129468b3a75521ccf7f32169e
7
+ data.tar.gz: be5dfb400e19d6dc433d4f700b318591455a8ba3dfe53fd79585c1efd594c6bcaf974872da5a4c247fb1cc2a7a3f7d48f9da52e971b6e4f611b655b6b2bda082
@@ -26,20 +26,25 @@ module Kitchen
26
26
  # 10/11 are listed last since we default to the first item in the hash
27
27
  # and 10/11 are not released yet. When they're released move them up
28
28
  DEBIAN_CODENAMES = {
29
- "9" => "stretch",
30
- "8" => "jessie",
31
- "7" => "wheezy",
32
- "6" => "squeeze",
33
- "11" => "bullseye",
34
- "10" => "buster",
35
- }
29
+ 9 => "stretch",
30
+ 8 => "jessie",
31
+ 7 => "wheezy",
32
+ 6 => "squeeze",
33
+ 11 => "bullseye",
34
+ 10 => "buster",
35
+ }.freeze
36
36
 
37
37
  def username
38
38
  "admin"
39
39
  end
40
40
 
41
41
  def codename
42
- version ? DEBIAN_CODENAMES[version] : DEBIAN_CODENAMES.values.first
42
+ v = version
43
+ if v && v.size > 1
44
+ warn("WARN: Debian version #{version} specified, but searching for #{version.to_i} instead.")
45
+ v = v.to_i
46
+ end
47
+ v ? DEBIAN_CODENAMES[v.to_i] : DEBIAN_CODENAMES.values.first
43
48
  end
44
49
 
45
50
  def image_search
@@ -63,6 +63,7 @@ module Kitchen
63
63
  default_config :ebs_optimized, false
64
64
  default_config :security_group_ids, nil
65
65
  default_config :security_group_filter, nil
66
+ default_config :security_group_cidr_ip, "0.0.0.0/0"
66
67
  default_config :tags, "created-by" => "test-kitchen"
67
68
  default_config :user_data do |driver|
68
69
  if driver.windows_os?
@@ -513,6 +514,11 @@ module Kitchen
513
514
  ready = aws_instance.exists? &&
514
515
  aws_instance.state.name == "running" &&
515
516
  hostname != "0.0.0.0"
517
+
518
+ if ready && ( hostname.nil? || hostname == "" )
519
+ debug("Unable to detect hostname using interface_type #{config[:interface]}. Fallback to ordered mapping")
520
+ state[:hostname] = hostname(aws_instance, nil)
521
+ end
516
522
  if ready && windows_os?
517
523
  output = server.console_output.output
518
524
  unless output.nil?
@@ -759,7 +765,7 @@ module Kitchen
759
765
  ip_protocol: "tcp",
760
766
  from_port: port,
761
767
  to_port: port,
762
- ip_ranges: [{ cidr_ip: "0.0.0.0/0" }],
768
+ ip_ranges: [{ cidr_ip: config[:security_group_cidr_ip] }],
763
769
  }
764
770
  end
765
771
  )
@@ -22,6 +22,6 @@ module Kitchen
22
22
  module Driver
23
23
 
24
24
  # Version string for EC2 Test Kitchen driver
25
- EC2_VERSION = "2.4.0"
25
+ EC2_VERSION = "2.5.0"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.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: 2018-12-20 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.4'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 1.4.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '1.4'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: 1.4.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: excon
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -146,9 +146,6 @@ dependencies:
146
146
  name: yard
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '0.9'
152
149
  - - ">="
153
150
  - !ruby/object:Gem::Version
154
151
  version: 0.9.11
@@ -156,9 +153,6 @@ dependencies:
156
153
  prerelease: false
157
154
  version_requirements: !ruby/object:Gem::Requirement
158
155
  requirements:
159
- - - "~>"
160
- - !ruby/object:Gem::Version
161
- version: '0.9'
162
156
  - - ">="
163
157
  - !ruby/object:Gem::Version
164
158
  version: 0.9.11
@@ -231,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
225
  - !ruby/object:Gem::Version
232
226
  version: '0'
233
227
  requirements: []
234
- rubyforge_project:
235
- rubygems_version: 2.7.7
228
+ rubygems_version: 3.0.3
236
229
  signing_key:
237
230
  specification_version: 4
238
231
  summary: A Test Kitchen Driver for Amazon EC2