test-kitchen 2.8.0 → 2.9.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 +4 -4
- data/lib/kitchen/cli.rb +1 -1
- data/lib/kitchen/provisioner/chef/policyfile.rb +1 -1
- data/lib/kitchen/transport/winrm.rb +10 -6
- data/lib/kitchen/util.rb +10 -0
- data/lib/kitchen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58365d9f59d1210a1c8f56f7fe095f285fde61e6251c61b164569b783d75d6f8
|
4
|
+
data.tar.gz: ceef4069cb15be71c35992173d3d347717f8149dc3a7fe2f4863e5a8aaac98c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf9e9206b2b78a39fa9fdeca2104e3cf17fed69821644f0055e7638e23a15f50dc11c9923718e5cb997d9a2ef416bbe2e48649fc6d6e7c02fd8627fbbe86f6b1
|
7
|
+
data.tar.gz: 86102634d2ad1b336cd5e18fdfe005ea7ef18f77e185351f041567aeb32b224609e457ca6904ea865bb18f278e836fdca4ae9afedff1877dd71564ed17d54d1b
|
data/lib/kitchen/cli.rb
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
|
18
18
|
# CI tests fail without an explicit unconditional require of Thor
|
19
|
-
require "thor" # rubocop:disable
|
19
|
+
require "thor" # rubocop:disable Chef/Ruby/UnlessDefinedRequire
|
20
20
|
|
21
21
|
require_relative "../kitchen"
|
22
22
|
require_relative "generator/init"
|
@@ -146,7 +146,7 @@ module Kitchen
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
logger.fatal("The `chef` executable cannot be found in your " \
|
149
|
-
"PATH. Ensure you have installed
|
149
|
+
"PATH. Ensure you have installed Chef Workstation " \
|
150
150
|
"from https://downloads.chef.io and that your PATH " \
|
151
151
|
"setting includes the path to the `chef` command.")
|
152
152
|
raise UserError,
|
@@ -308,16 +308,20 @@ module Kitchen
|
|
308
308
|
|
309
309
|
# Builds a `LoginCommand` for use by Linux-based platforms.
|
310
310
|
#
|
311
|
-
# TODO: determine whether or not `desktop` exists
|
312
|
-
#
|
313
311
|
# @return [LoginCommand] a login command
|
314
312
|
# @api private
|
315
313
|
def login_command_for_linux
|
316
|
-
|
317
|
-
|
318
|
-
|
314
|
+
xfreerdp = Util.command_exists? "xfreerdp"
|
315
|
+
unless xfreerdp
|
316
|
+
raise WinrmFailed, "xfreerdp binary not found. Please install freerdp2-x11 on Debian-based systems or freerdp on Redhat-based systems."
|
317
|
+
end
|
318
|
+
|
319
|
+
args = %W{/u:#{options[:user]}}
|
320
|
+
args += %W{/p:#{options[:password]}} if options.key?(:password)
|
321
|
+
args += %W{/v:#{URI.parse(options[:endpoint]).host}:#{rdp_port}}
|
322
|
+
args += %W{/cert-tofu} # always accept certificate
|
319
323
|
|
320
|
-
LoginCommand.new(
|
324
|
+
LoginCommand.new(xfreerdp, args)
|
321
325
|
end
|
322
326
|
|
323
327
|
# Builds a `LoginCommand` for use by Mac-based platforms.
|
data/lib/kitchen/util.rb
CHANGED
@@ -215,5 +215,15 @@ module Kitchen
|
|
215
215
|
def self.snake_case(a_string)
|
216
216
|
Thor::Util.snake_case(a_string)
|
217
217
|
end
|
218
|
+
|
219
|
+
# Check if a cmd exists on the PATH
|
220
|
+
def self.command_exists?(cmd)
|
221
|
+
paths = ENV["PATH"].split(File::PATH_SEPARATOR) + [ "/bin", "/usr/bin", "/sbin", "/usr/sbin" ]
|
222
|
+
paths.each do |path|
|
223
|
+
filename = File.join(path, cmd)
|
224
|
+
return filename if File.executable?(filename)
|
225
|
+
end
|
226
|
+
false
|
227
|
+
end
|
218
228
|
end
|
219
229
|
end
|
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.9.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: 2020-12-
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|