test-kitchen 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb6ceb9a2ef6ae7f76a3edad93e1f74e035c5b7c4187e3385dd02787faec5535
4
- data.tar.gz: b8ffaa1abdad8faf9e76ca894c552972a7ce054925ef28cb29f8318cfd21657e
3
+ metadata.gz: '0640246228199bba84492ed9e4b1261d15afcbc5565718a071d500c3b2ae0a3d'
4
+ data.tar.gz: a697dabc83dc08a3ea1170af7cd0a9c5db500fbae05db675f62e67a65ecd7edb
5
5
  SHA512:
6
- metadata.gz: 9180f058a260d94acb55c5739a8a1994f57bb0238bc9e0d00081a0904bbda0a1ba9ebc41a538ab3c4d89f505f4fb638eb759f163a17c73aa2625d18f1752dd56
7
- data.tar.gz: 9b8c843a1d4875f11df5f1d21537d3e1c30ae882dbfcb060d1c4210e2db40782f14e8f68aff406bc7c45ed95bd109f181206b16210897e2757f35cc22f08dc03
6
+ metadata.gz: 3f6b6482f458207ea554865365984a3ea67c9e44948c9f62145dfae24e96dc745c2d383488a0b24990a16a6e265d1d561c9d7924b45d60c7d514b90ee2a1282e
7
+ data.tar.gz: 8baf732f99adb9b5576d30b8a41ea1d6e293566d9615d6f6716a555e13e28541faef94284c337c8eaed59b99b46297681ba682838f62e06bdaf9907797934dd4
@@ -46,6 +46,8 @@ module Kitchen
46
46
  run(phase, :pre)
47
47
  yield
48
48
  run(phase, :post)
49
+ ensure
50
+ run(phase, :finally)
49
51
  end
50
52
 
51
53
  # @return [Kitchen::StateFile]
@@ -56,7 +58,7 @@ module Kitchen
56
58
  # Execute a specific lifecycle hook.
57
59
  #
58
60
  # @param phase [String] Lifecycle phase which is being executed.
59
- # @param hook_timing [Symbol] `:pre` or `:post` to indicate which hook to run.
61
+ # @param hook_timing [Symbol] `:pre`, `:post`, or `:finally` to indicate which hook to run.
60
62
  # @return [void]
61
63
  def run(phase, hook_timing)
62
64
  # Yes this has to be a symbol because of how data munger works.
@@ -73,14 +73,17 @@ module Kitchen
73
73
  conn.upload(sandbox_dirs, config[:root_path])
74
74
  debug("Transfer complete")
75
75
  conn.execute(prepare_command)
76
- conn.execute(run_command)
77
76
 
78
- info("Downloading files from #{instance.to_str}")
79
- config[:downloads].to_h.each do |remotes, local|
80
- debug("Downloading #{Array(remotes).join(", ")} to #{local}")
81
- conn.download(remotes, local)
77
+ begin
78
+ conn.execute(run_command)
79
+ ensure
80
+ info("Downloading files from #{instance.to_str}")
81
+ config[:downloads].to_h.each do |remotes, local|
82
+ debug("Downloading #{Array(remotes).join(", ")} to #{local}")
83
+ conn.download(remotes, local)
84
+ end
85
+ debug("Download complete")
82
86
  end
83
- debug("Download complete")
84
87
  end
85
88
  rescue Kitchen::Transport::TransportFailed => ex
86
89
  raise ActionFailed, ex.message
@@ -16,5 +16,5 @@
16
16
  # limitations under the License.
17
17
 
18
18
  module Kitchen
19
- VERSION = "3.4.0".freeze
19
+ VERSION = "3.5.0".freeze
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-kitchen
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: 2022-10-20 00:00:00.000000000 Z
11
+ date: 2022-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt_pbkdf