kitchen-ec2 3.11.0 → 3.11.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
  SHA256:
3
- metadata.gz: 862c1fd03a10f0ad6125f5ea8f5126bf5660e1b7050f9b550001bc7ab9302d91
4
- data.tar.gz: f093d5cf16248830e3ab5aa1567354567bf6568e2a9b8d40d5fe5be4711c915f
3
+ metadata.gz: 8db131041ca62ab75984ff3a397e349838a750a6041bb4e57467e6bd74918b3f
4
+ data.tar.gz: 171e39a4ff4eafb0bdf80789c517813360c8438e992329c76562815d3cf31719
5
5
  SHA512:
6
- metadata.gz: 3dbea4d3b992f1aebb989f8e894e040ed281d877694474a62afe67ceb4335e18e49463b3039b0c7996ad868f6fda843ff30a625fa92fb479912a4f552b591d23
7
- data.tar.gz: 2367f3182eae5baee7e1b86785961b8f54c0820f9a7bfe35e7e1f8ef3f3731514eb5384166a1229f064df02246208d46950173611537d4868b1ff2883d5577e8
6
+ metadata.gz: ed0a53d4b538412b96dbf872bf7a1dbebd0c64a65ed0620d506164296aade28893d410fb508a7073fa7a9ce7829f0a26afc88ecae1aecd2f972e3cea21bcaff6
7
+ data.tar.gz: 0de4ad1727d5c286ae3d1fabc39d49b61b186dfbccfd6ba9e0275f85d3db00d9ccbf71ed1cfb10c4dd821b027836d6b3dcf3c2a0d7e75be895b21c9dd216b35d
@@ -286,13 +286,16 @@ module Kitchen
286
286
  # to wait for the instance to shut down. This slightly breaks the
287
287
  # subsystem encapsulation, sorry not sorry.
288
288
  if state[:auto_security_group_id] && server && ec2.instance_exists?(state[:server_id])
289
- server.wait_until_terminated do |waiter|
290
- waiter.max_attempts = config[:retryable_tries]
291
- waiter.delay = config[:retryable_sleep]
292
- waiter.before_attempt do |attempts|
293
- info "Waited #{attempts * waiter.delay}/#{waiter.delay * waiter.max_attempts}s for instance <#{server.id}> to terminate."
294
- end
289
+ wait_log = proc do |attempts|
290
+ c = attempts * config[:retryable_sleep]
291
+ t = config[:retryable_tries] * config[:retryable_sleep]
292
+ info "Waited #{c}/#{t}s for instance <#{server.id}> to terminate."
295
293
  end
294
+ server.wait_until_terminated(
295
+ max_attempts: config[:retryable_tries],
296
+ delay: config[:retryable_sleep],
297
+ before_attempt: wait_log
298
+ )
296
299
  end
297
300
  info("EC2 instance <#{state[:server_id]}> destroyed.")
298
301
  state.delete(:server_id)
@@ -365,7 +368,7 @@ module Kitchen
365
368
  if actual_platform &&
366
369
  instance.transport[:username] == instance.transport.class.defaults[:username]
367
370
  debug("No SSH username specified: using default username #{actual_platform.username} " \
368
- " for image #{config[:image_id]}, which we detected as #{actual_platform}.")
371
+ "for image #{config[:image_id]}, which we detected as #{actual_platform}.")
369
372
  state[:username] = actual_platform.username
370
373
  end
371
374
  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 = "3.11.0".freeze
24
+ EC2_VERSION = "3.11.1".freeze
25
25
  end
26
26
  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.11.0
4
+ version: 3.11.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: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen