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 +4 -4
- data/Gemfile +2 -2
- data/lib/kitchen/cli.rb +2 -2
- data/lib/kitchen/command/console.rb +1 -1
- data/lib/kitchen/lifecycle_hook/remote.rb +8 -2
- data/lib/kitchen/provisioner/base.rb +1 -3
- data/lib/kitchen/provisioner/chef_zero.rb +11 -0
- data/lib/kitchen/transport/winrm.rb +3 -5
- data/lib/kitchen/verifier/base.rb +1 -3
- data/lib/kitchen/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc041ba149f1e4bec89f846b40d1888dda814d55a1b7968f2c4a37d8cd6ab890
|
4
|
+
data.tar.gz: 3c5ce6235b30e8e28182218c04d683b96a6e662a95c817bba78bac6d2c59aa38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17c171f8baa2ea8730d5c27f5c1e428f1a71e1b584e95ca76f46e181444261eeef54fd39c2268efe3aaa17bac01948294786184bc11990221009a930a08bd91
|
7
|
+
data.tar.gz: 9bc7a23f2f43be47f37bef8fac6de614c41038033038476a4110ebfb61925955fe0512c517e6ea2929b3664ee379aceb8594bf943001514ffaec2612aa2c80ad
|
data/Gemfile
CHANGED
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
|
@@ -18,8 +18,14 @@ module Kitchen
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
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 ||=
|
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 ||=
|
369
|
-
|
370
|
-
|
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 ||=
|
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
|
data/lib/kitchen/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|