test-kitchen 2.11.2 → 2.12.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: 50a5869d9e42e825114235ba5906b29590610fae29325445d10f36c17b2c25c5
4
- data.tar.gz: 2fa37f0832ddf1890a50be2fef7611dace27df7c5e9915e9245855cc4d497772
3
+ metadata.gz: fc041ba149f1e4bec89f846b40d1888dda814d55a1b7968f2c4a37d8cd6ab890
4
+ data.tar.gz: 3c5ce6235b30e8e28182218c04d683b96a6e662a95c817bba78bac6d2c59aa38
5
5
  SHA512:
6
- metadata.gz: 17a6a5c8c0aa1162ce1ca4f9913fbe0825a845fa64ed5ec15afee5a6cca6238e12a8abc8a87d5c256b893dde007dafcba4c146ba81e3580eac1162b1db8a9c98
7
- data.tar.gz: c99f2570b910d6d839048aa692c5cf371ac887c38980ebb28b90d6fd0c57524b099a286392c714387e7ed0d1f0a6caf1c93f59874efd2611c941f819b69ab43f
6
+ metadata.gz: d17c171f8baa2ea8730d5c27f5c1e428f1a71e1b584e95ca76f46e181444261eeef54fd39c2268efe3aaa17bac01948294786184bc11990221009a930a08bd91
7
+ data.tar.gz: 9bc7a23f2f43be47f37bef8fac6de614c41038033038476a4110ebfb61925955fe0512c517e6ea2929b3664ee379aceb8594bf943001514ffaec2612aa2c80ad
data/Gemfile CHANGED
@@ -11,11 +11,11 @@ group :integration do
11
11
  end
12
12
 
13
13
  group :debug do
14
- gem "pry"
14
+ gem "pry", "~>0.12"
15
15
  gem "pry-byebug"
16
16
  gem "pry-stack_explorer"
17
17
  end
18
18
 
19
19
  group :chefstyle do
20
- gem "chefstyle", "1.7.2"
20
+ gem "chefstyle", "2.0.4"
21
21
  end
data/lib/kitchen/cli.rb CHANGED
@@ -285,7 +285,7 @@ module Kitchen
285
285
  perform("exec", "exec", args)
286
286
  end
287
287
 
288
- desc "version", "Print Kitchen's version information"
288
+ desc "version", "Print Test Kitchen's version information"
289
289
  def version
290
290
  puts "Test Kitchen version #{Kitchen::VERSION}"
291
291
  end
@@ -296,7 +296,7 @@ module Kitchen
296
296
  perform("sink", "sink")
297
297
  end
298
298
 
299
- desc "console", "Kitchen Console!"
299
+ desc "console", "Test Kitchen Console!"
300
300
  def console
301
301
  perform("console", "console")
302
302
  end
@@ -43,7 +43,7 @@ module Kitchen
43
43
  def prompt(char)
44
44
  proc do |target_self, nest_level, pry|
45
45
  [
46
- "[#{pry.input_array.size}] ",
46
+ "[#{pry.input_ring.size}] ",
47
47
  "kc(#{Pry.view_clip(target_self.class)})",
48
48
  "#{":#{nest_level}" unless nest_level == 0}#{char} ",
49
49
  ].join
@@ -18,8 +18,14 @@ module Kitchen
18
18
  end
19
19
  end
20
20
 
21
- conn = instance.transport.connection(state_file.read)
22
- conn.execute(command)
21
+ begin
22
+ conn = instance.transport.connection(state_file.read)
23
+ conn.execute(command)
24
+ rescue Kitchen::Transport::SshFailed => e
25
+ return if hook[:skippable] && e.message.match(/^SSH exited \(\d{1,3}\) for command: \[.+\]$/)
26
+
27
+ raise
28
+ end
23
29
  end
24
30
 
25
31
  private
@@ -177,11 +177,9 @@ module Kitchen
177
177
  # @raise [ClientError] if the sandbox directory has no yet been created
178
178
  # by calling `#create_sandbox`
179
179
  def sandbox_path
180
- @sandbox_path ||= begin
181
- raise ClientError, "Sandbox directory has not yet " \
180
+ @sandbox_path ||= raise ClientError, "Sandbox directory has not yet " \
182
181
  "been created. Please run #{self.class}#create_sandox before " \
183
182
  "trying to access the path."
184
- end
185
183
  end
186
184
 
187
185
  # Deletes the sandbox path. Without calling this method, the sandbox path
@@ -70,6 +70,7 @@ module Kitchen
70
70
  json = remote_path_join(config[:root_path], "dna.json")
71
71
  args << "--json-attributes #{json}"
72
72
  end
73
+
73
74
  args << "--logfile #{config[:log_file]}" if config[:log_file]
74
75
 
75
76
  # these flags are chef-client local mode only and will not work
@@ -77,10 +78,20 @@ module Kitchen
77
78
  if config[:chef_zero_host]
78
79
  args << "--chef-zero-host #{config[:chef_zero_host]}"
79
80
  end
81
+
80
82
  if config[:chef_zero_port]
81
83
  args << "--chef-zero-port #{config[:chef_zero_port]}"
82
84
  end
85
+
83
86
  args << "--profile-ruby" if config[:profile_ruby]
87
+
88
+ if config[:slow_resource_report]
89
+ if config[:slow_resource_report].is_a?(Integer)
90
+ args << "--slow-report #{config[:slow_resource_report]}"
91
+ else
92
+ args << "--slow-report"
93
+ end
94
+ end
84
95
  end
85
96
  # rubocop:enable Metrics/CyclomaticComplexity
86
97
 
@@ -365,11 +365,9 @@ module Kitchen
365
365
  # @return [Winrm::Shells::Elevated] the elevated shell
366
366
  # @api private
367
367
  def elevated_session(retry_options = {})
368
- @elevated_session ||= begin
369
- connection(retry_options).shell(:elevated).tap do |shell|
370
- shell.username = options[:elevated_username]
371
- shell.password = options[:elevated_password]
372
- end
368
+ @elevated_session ||= connection(retry_options).shell(:elevated).tap do |shell|
369
+ shell.username = options[:elevated_username]
370
+ shell.password = options[:elevated_password]
373
371
  end
374
372
  end
375
373
 
@@ -169,11 +169,9 @@ module Kitchen
169
169
  # @raise [ClientError] if the sandbox directory has no yet been created
170
170
  # by calling `#create_sandbox`
171
171
  def sandbox_path
172
- @sandbox_path ||= begin
173
- raise ClientError, "Sandbox directory has not yet " \
172
+ @sandbox_path ||= raise ClientError, "Sandbox directory has not yet " \
174
173
  "been created. Please run #{self.class}#create_sandox before " \
175
174
  "trying to access the path."
176
- end
177
175
  end
178
176
 
179
177
  # Sets the API version for this verifier. If the verifier does not set
@@ -16,5 +16,5 @@
16
16
  # limitations under the License.
17
17
 
18
18
  module Kitchen
19
- VERSION = "2.11.2".freeze
19
+ VERSION = "2.12.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: 2.11.2
4
+ version: 2.12.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: 2021-03-25 00:00:00.000000000 Z
11
+ date: 2021-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
@@ -519,7 +519,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
519
519
  - !ruby/object:Gem::Version
520
520
  version: '0'
521
521
  requirements: []
522
- rubygems_version: 3.1.4
522
+ rubygems_version: 3.2.15
523
523
  signing_key:
524
524
  specification_version: 4
525
525
  summary: Test Kitchen is an integration tool for developing and testing infrastructure