test-kitchen 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +14 -3
- data/lib/kitchen/cli.rb +1 -1
- data/lib/kitchen/command/diagnose.rb +1 -1
- data/lib/kitchen/config.rb +8 -8
- data/lib/kitchen/driver/ssh_base.rb +1 -1
- data/lib/kitchen/lifecycle_hook/local.rb +1 -1
- data/lib/kitchen/platform.rb +1 -1
- data/lib/kitchen/platform_filter.rb +1 -1
- data/lib/kitchen/provisioner/chef/common_sandbox.rb +5 -5
- data/lib/kitchen/provisioner/chef_base.rb +4 -4
- data/lib/kitchen/transport/ssh.rb +2 -2
- data/lib/kitchen/transport/winrm.rb +5 -5
- data/lib/kitchen/version.rb +1 -1
- data/lib/kitchen.rb +1 -1
- data/test-kitchen.gemspec +1 -13
- metadata +4 -162
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecd483d58546fb48da8bb5a4e5c448b7cc2f8b7d2c0082d0df4b023c380a2594
|
4
|
+
data.tar.gz: cb42f2dae4d33d84ff8515a7412d7e1d14c358504f66429b21465bef7714e48b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8adf00afe37d4b31dec9b6acca4aee2aa858b265db0fee4f0c0fac8407691f452e7d487d45ec5f72e816d0799060affcaf31d8885597ade1a9d40dc59f6056bc
|
7
|
+
data.tar.gz: bc82343bf133cbce4c9c5096d1d88a9bb7ab56cf619d289f71008388757d553c43432f3188d72ddc87c917212ce6a6278ee0d81a64b8f7d688341e387da2949f
|
data/Gemfile
CHANGED
@@ -1,8 +1,19 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
# Specify your gem"s dependencies in test-kitchen.gemspec
|
4
3
|
gemspec
|
5
4
|
|
5
|
+
group :test do
|
6
|
+
gem "rake"
|
7
|
+
gem "rb-readline"
|
8
|
+
gem "aruba", ">= 0.11", "< 3.0"
|
9
|
+
gem "countloc", "~> 0.4"
|
10
|
+
gem "cucumber", ">= 2.1", "< 8.1"
|
11
|
+
gem "fakefs", "~> 2.0"
|
12
|
+
gem "maruku", "~> 0.6"
|
13
|
+
gem "minitest", "~> 5.3", "< 5.16"
|
14
|
+
gem "mocha", "~> 2.0"
|
15
|
+
end
|
16
|
+
|
6
17
|
group :integration do
|
7
18
|
gem "berkshelf"
|
8
19
|
gem "kitchen-dokken"
|
@@ -11,5 +22,5 @@ group :integration do
|
|
11
22
|
end
|
12
23
|
|
13
24
|
group :chefstyle do
|
14
|
-
gem "chefstyle", "2.2.
|
15
|
-
end
|
25
|
+
gem "chefstyle", "2.2.3"
|
26
|
+
end
|
data/lib/kitchen/cli.rb
CHANGED
data/lib/kitchen/config.rb
CHANGED
@@ -216,11 +216,11 @@ module Kitchen
|
|
216
216
|
/^win/i.match?(platform) ? "winrm" : Transport::DEFAULT_PLUGIN
|
217
217
|
end,
|
218
218
|
},
|
219
|
-
kitchen_root
|
220
|
-
test_base_path
|
221
|
-
log_level
|
222
|
-
log_overwrite
|
223
|
-
debug
|
219
|
+
kitchen_root:,
|
220
|
+
test_base_path:,
|
221
|
+
log_level:,
|
222
|
+
log_overwrite:,
|
223
|
+
debug:,
|
224
224
|
}
|
225
225
|
end
|
226
226
|
|
@@ -250,8 +250,8 @@ module Kitchen
|
|
250
250
|
driver: new_driver(suite, platform),
|
251
251
|
lifecycle_hooks: new_lifecycle_hooks(suite, platform, sf),
|
252
252
|
logger: new_instance_logger(suite, platform, index),
|
253
|
-
suite
|
254
|
-
platform
|
253
|
+
suite:,
|
254
|
+
platform:,
|
255
255
|
provisioner: new_provisioner(suite, platform),
|
256
256
|
transport: new_transport(suite, platform),
|
257
257
|
verifier: new_verifier(suite, platform),
|
@@ -275,7 +275,7 @@ module Kitchen
|
|
275
275
|
color: Color::COLORS[index % Color::COLORS.size].to_sym,
|
276
276
|
logdev: log_location,
|
277
277
|
level: Util.to_logger_level(log_level),
|
278
|
-
log_overwrite
|
278
|
+
log_overwrite:,
|
279
279
|
progname: name,
|
280
280
|
colorize: @colorize
|
281
281
|
)
|
@@ -299,7 +299,7 @@ module Kitchen
|
|
299
299
|
# @param options [Hash] configuration hash (default: `{}`)
|
300
300
|
# @api private
|
301
301
|
def wait_for_sshd(hostname, username = nil, options = {})
|
302
|
-
pseudo_state = { hostname:
|
302
|
+
pseudo_state = { hostname: }
|
303
303
|
pseudo_state[:username] = username if username
|
304
304
|
pseudo_state.merge!(options)
|
305
305
|
|
data/lib/kitchen/platform.rb
CHANGED
@@ -26,7 +26,7 @@ module Kitchen
|
|
26
26
|
# @author Baptiste Courtois <b.courtois@criteo.com>
|
27
27
|
class PlatformFilter
|
28
28
|
# Pattern used to determine whether a filter should be handled as a Regexp
|
29
|
-
REGEXP_LIKE_PATTERN = %r{^/(?<pattern>.*)/(?<options>[ix]*)$}
|
29
|
+
REGEXP_LIKE_PATTERN = %r{^/(?<pattern>.*)/(?<options>[ix]*)$}
|
30
30
|
|
31
31
|
# Converts platform filters into an array of PlatformFilter handling both strings and Regexp.
|
32
32
|
# A string "looks-like" a regexp if it starts by / and end by / + Regexp options i or x
|
@@ -287,9 +287,9 @@ module Kitchen
|
|
287
287
|
def update_dna_for_policyfile
|
288
288
|
policy = Chef::Policyfile.new(
|
289
289
|
policyfile, sandbox_path,
|
290
|
-
logger
|
290
|
+
logger:,
|
291
291
|
always_update: config[:always_update_cookbooks],
|
292
|
-
policy_group
|
292
|
+
policy_group:,
|
293
293
|
license: config[:chef_license]
|
294
294
|
)
|
295
295
|
Kitchen.mutex.synchronize do
|
@@ -297,7 +297,7 @@ module Kitchen
|
|
297
297
|
end
|
298
298
|
policy_name = JSON.parse(IO.read(policy.lockfile))["name"]
|
299
299
|
policy_group = config[:policy_group] || "local"
|
300
|
-
config[:attributes].merge(policy_name
|
300
|
+
config[:attributes].merge(policy_name:, policy_group:)
|
301
301
|
end
|
302
302
|
|
303
303
|
# Performs a Policyfile cookbook resolution inside a common mutex.
|
@@ -307,7 +307,7 @@ module Kitchen
|
|
307
307
|
Kitchen.mutex.synchronize do
|
308
308
|
Chef::Policyfile.new(
|
309
309
|
policyfile, sandbox_path,
|
310
|
-
logger
|
310
|
+
logger:,
|
311
311
|
always_update: config[:always_update_cookbooks],
|
312
312
|
policy_group: config[:policy_group],
|
313
313
|
license: config[:chef_license]
|
@@ -321,7 +321,7 @@ module Kitchen
|
|
321
321
|
def resolve_with_berkshelf
|
322
322
|
Kitchen.mutex.synchronize do
|
323
323
|
Chef::Berkshelf.new(berksfile, tmpbooks_dir,
|
324
|
-
logger
|
324
|
+
logger:,
|
325
325
|
always_update: config[:always_update_cookbooks]).resolve
|
326
326
|
end
|
327
327
|
end
|
@@ -210,7 +210,7 @@ module Kitchen
|
|
210
210
|
|
211
211
|
deprecate_config_for :install_msi_url, Util.outdent!(<<-MSG)
|
212
212
|
The 'install_msi_url' will be relaced by the 'download_url' attribute.
|
213
|
-
'download_url' will be applied to Bourne and
|
213
|
+
'download_url' will be applied to Bourne and PowerShell download scripts.
|
214
214
|
|
215
215
|
Note: 'product_name' must be set in order to use 'download_url'
|
216
216
|
until 'product_name' replaces 'require_chef_omnibus' as the default.
|
@@ -347,7 +347,7 @@ module Kitchen
|
|
347
347
|
omnibus_url: config[:chef_omnibus_url],
|
348
348
|
project: project.nil? ? nil : project[1],
|
349
349
|
install_flags: config[:chef_omnibus_install_options],
|
350
|
-
sudo_command
|
350
|
+
sudo_command:,
|
351
351
|
}.tap do |opts|
|
352
352
|
opts[:root] = config[:chef_omnibus_root] if config.key? :chef_omnibus_root
|
353
353
|
%i{install_msi_url http_proxy https_proxy}.each do |key|
|
@@ -482,10 +482,10 @@ module Kitchen
|
|
482
482
|
super
|
483
483
|
if File.exist?(policyfile)
|
484
484
|
debug("Policyfile found at #{policyfile}, using Policyfile to resolve cookbook dependencies")
|
485
|
-
Chef::Policyfile.load!(logger:
|
485
|
+
Chef::Policyfile.load!(logger:)
|
486
486
|
elsif File.exist?(berksfile)
|
487
487
|
debug("Berksfile found at #{berksfile}, using Berkshelf to resolve cookbook dependencies")
|
488
|
-
Chef::Berkshelf.load!(logger:
|
488
|
+
Chef::Berkshelf.load!(logger:)
|
489
489
|
end
|
490
490
|
end
|
491
491
|
|
@@ -225,7 +225,7 @@ module Kitchen
|
|
225
225
|
delay = 3
|
226
226
|
session(
|
227
227
|
retries: max_wait_until_ready / delay,
|
228
|
-
delay
|
228
|
+
delay:,
|
229
229
|
message: "Waiting for SSH service on #{hostname}:#{port}, " \
|
230
230
|
"retrying in #{delay} seconds"
|
231
231
|
)
|
@@ -468,7 +468,7 @@ module Kitchen
|
|
468
468
|
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
469
469
|
def connection_options(data)
|
470
470
|
opts = {
|
471
|
-
logger
|
471
|
+
logger:,
|
472
472
|
user_known_hosts_file: "/dev/null",
|
473
473
|
hostname: data[:hostname],
|
474
474
|
port: data[:port],
|
@@ -258,10 +258,10 @@ module Kitchen
|
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
261
|
-
# Execute a
|
261
|
+
# Execute a PowerShell script over WinRM and return the command's
|
262
262
|
# exit code and standard error.
|
263
263
|
#
|
264
|
-
# @param command [String]
|
264
|
+
# @param command [String] PowerShell script to execute
|
265
265
|
# @return [[Integer,String]] an array containing the exit code of the
|
266
266
|
# script and the standard error stream
|
267
267
|
# @api private
|
@@ -444,8 +444,8 @@ module Kitchen
|
|
444
444
|
opts = {
|
445
445
|
instance_name: instance.name,
|
446
446
|
kitchen_root: data[:kitchen_root],
|
447
|
-
logger
|
448
|
-
endpoint
|
447
|
+
logger:,
|
448
|
+
endpoint:,
|
449
449
|
user: data[:username],
|
450
450
|
password: data[:password],
|
451
451
|
rdp_port: data[:rdp_port],
|
@@ -457,7 +457,7 @@ module Kitchen
|
|
457
457
|
transport: data[:winrm_transport],
|
458
458
|
elevated: data[:elevated],
|
459
459
|
elevated_username: data[:elevated_username] || data[:username],
|
460
|
-
elevated_password
|
460
|
+
elevated_password:,
|
461
461
|
}
|
462
462
|
opts.merge!(additional_transport_args(data, opts[:transport]))
|
463
463
|
if opts[:transport].to_sym == :ssl && opts.key?(:client_cert) && opts.key?(:client_key)
|
data/lib/kitchen/version.rb
CHANGED
data/lib/kitchen.rb
CHANGED
data/test-kitchen.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.executables = %w{kitchen}
|
21
21
|
gem.require_paths = ["lib"]
|
22
22
|
|
23
|
-
gem.required_ruby_version = ">=
|
23
|
+
gem.required_ruby_version = ">= 3.1"
|
24
24
|
|
25
25
|
gem.add_dependency "bcrypt_pbkdf", "~> 1.0" # ed25519 ssh key support
|
26
26
|
gem.add_dependency "chef-utils", ">= 16.4.35"
|
@@ -37,16 +37,4 @@ Gem::Specification.new do |gem|
|
|
37
37
|
# Required to run the Chef provisioner local license check for remote systems
|
38
38
|
# TK is not under Chef EULA
|
39
39
|
gem.add_dependency "license-acceptance", ">= 1.0.11", "< 3.0" # pinning until we can confirm 3+ works
|
40
|
-
|
41
|
-
gem.add_development_dependency "bundler"
|
42
|
-
gem.add_development_dependency "rake"
|
43
|
-
gem.add_development_dependency "rb-readline"
|
44
|
-
|
45
|
-
gem.add_development_dependency "aruba", ">= 0.11", "< 3.0"
|
46
|
-
gem.add_development_dependency "countloc", "~> 0.4"
|
47
|
-
gem.add_development_dependency "cucumber", ">= 2.1", "< 8.0"
|
48
|
-
gem.add_development_dependency "fakefs", "~> 1.0"
|
49
|
-
gem.add_development_dependency "maruku", "~> 0.6"
|
50
|
-
gem.add_development_dependency "minitest", "~> 5.3", "< 5.16"
|
51
|
-
gem.add_development_dependency "mocha", "~> 1.1"
|
52
40
|
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
|
+
version: 3.6.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:
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt_pbkdf
|
@@ -228,164 +228,6 @@ dependencies:
|
|
228
228
|
- - "<"
|
229
229
|
- !ruby/object:Gem::Version
|
230
230
|
version: '3.0'
|
231
|
-
- !ruby/object:Gem::Dependency
|
232
|
-
name: bundler
|
233
|
-
requirement: !ruby/object:Gem::Requirement
|
234
|
-
requirements:
|
235
|
-
- - ">="
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: '0'
|
238
|
-
type: :development
|
239
|
-
prerelease: false
|
240
|
-
version_requirements: !ruby/object:Gem::Requirement
|
241
|
-
requirements:
|
242
|
-
- - ">="
|
243
|
-
- !ruby/object:Gem::Version
|
244
|
-
version: '0'
|
245
|
-
- !ruby/object:Gem::Dependency
|
246
|
-
name: rake
|
247
|
-
requirement: !ruby/object:Gem::Requirement
|
248
|
-
requirements:
|
249
|
-
- - ">="
|
250
|
-
- !ruby/object:Gem::Version
|
251
|
-
version: '0'
|
252
|
-
type: :development
|
253
|
-
prerelease: false
|
254
|
-
version_requirements: !ruby/object:Gem::Requirement
|
255
|
-
requirements:
|
256
|
-
- - ">="
|
257
|
-
- !ruby/object:Gem::Version
|
258
|
-
version: '0'
|
259
|
-
- !ruby/object:Gem::Dependency
|
260
|
-
name: rb-readline
|
261
|
-
requirement: !ruby/object:Gem::Requirement
|
262
|
-
requirements:
|
263
|
-
- - ">="
|
264
|
-
- !ruby/object:Gem::Version
|
265
|
-
version: '0'
|
266
|
-
type: :development
|
267
|
-
prerelease: false
|
268
|
-
version_requirements: !ruby/object:Gem::Requirement
|
269
|
-
requirements:
|
270
|
-
- - ">="
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
version: '0'
|
273
|
-
- !ruby/object:Gem::Dependency
|
274
|
-
name: aruba
|
275
|
-
requirement: !ruby/object:Gem::Requirement
|
276
|
-
requirements:
|
277
|
-
- - ">="
|
278
|
-
- !ruby/object:Gem::Version
|
279
|
-
version: '0.11'
|
280
|
-
- - "<"
|
281
|
-
- !ruby/object:Gem::Version
|
282
|
-
version: '3.0'
|
283
|
-
type: :development
|
284
|
-
prerelease: false
|
285
|
-
version_requirements: !ruby/object:Gem::Requirement
|
286
|
-
requirements:
|
287
|
-
- - ">="
|
288
|
-
- !ruby/object:Gem::Version
|
289
|
-
version: '0.11'
|
290
|
-
- - "<"
|
291
|
-
- !ruby/object:Gem::Version
|
292
|
-
version: '3.0'
|
293
|
-
- !ruby/object:Gem::Dependency
|
294
|
-
name: countloc
|
295
|
-
requirement: !ruby/object:Gem::Requirement
|
296
|
-
requirements:
|
297
|
-
- - "~>"
|
298
|
-
- !ruby/object:Gem::Version
|
299
|
-
version: '0.4'
|
300
|
-
type: :development
|
301
|
-
prerelease: false
|
302
|
-
version_requirements: !ruby/object:Gem::Requirement
|
303
|
-
requirements:
|
304
|
-
- - "~>"
|
305
|
-
- !ruby/object:Gem::Version
|
306
|
-
version: '0.4'
|
307
|
-
- !ruby/object:Gem::Dependency
|
308
|
-
name: cucumber
|
309
|
-
requirement: !ruby/object:Gem::Requirement
|
310
|
-
requirements:
|
311
|
-
- - ">="
|
312
|
-
- !ruby/object:Gem::Version
|
313
|
-
version: '2.1'
|
314
|
-
- - "<"
|
315
|
-
- !ruby/object:Gem::Version
|
316
|
-
version: '8.0'
|
317
|
-
type: :development
|
318
|
-
prerelease: false
|
319
|
-
version_requirements: !ruby/object:Gem::Requirement
|
320
|
-
requirements:
|
321
|
-
- - ">="
|
322
|
-
- !ruby/object:Gem::Version
|
323
|
-
version: '2.1'
|
324
|
-
- - "<"
|
325
|
-
- !ruby/object:Gem::Version
|
326
|
-
version: '8.0'
|
327
|
-
- !ruby/object:Gem::Dependency
|
328
|
-
name: fakefs
|
329
|
-
requirement: !ruby/object:Gem::Requirement
|
330
|
-
requirements:
|
331
|
-
- - "~>"
|
332
|
-
- !ruby/object:Gem::Version
|
333
|
-
version: '1.0'
|
334
|
-
type: :development
|
335
|
-
prerelease: false
|
336
|
-
version_requirements: !ruby/object:Gem::Requirement
|
337
|
-
requirements:
|
338
|
-
- - "~>"
|
339
|
-
- !ruby/object:Gem::Version
|
340
|
-
version: '1.0'
|
341
|
-
- !ruby/object:Gem::Dependency
|
342
|
-
name: maruku
|
343
|
-
requirement: !ruby/object:Gem::Requirement
|
344
|
-
requirements:
|
345
|
-
- - "~>"
|
346
|
-
- !ruby/object:Gem::Version
|
347
|
-
version: '0.6'
|
348
|
-
type: :development
|
349
|
-
prerelease: false
|
350
|
-
version_requirements: !ruby/object:Gem::Requirement
|
351
|
-
requirements:
|
352
|
-
- - "~>"
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
version: '0.6'
|
355
|
-
- !ruby/object:Gem::Dependency
|
356
|
-
name: minitest
|
357
|
-
requirement: !ruby/object:Gem::Requirement
|
358
|
-
requirements:
|
359
|
-
- - "~>"
|
360
|
-
- !ruby/object:Gem::Version
|
361
|
-
version: '5.3'
|
362
|
-
- - "<"
|
363
|
-
- !ruby/object:Gem::Version
|
364
|
-
version: '5.16'
|
365
|
-
type: :development
|
366
|
-
prerelease: false
|
367
|
-
version_requirements: !ruby/object:Gem::Requirement
|
368
|
-
requirements:
|
369
|
-
- - "~>"
|
370
|
-
- !ruby/object:Gem::Version
|
371
|
-
version: '5.3'
|
372
|
-
- - "<"
|
373
|
-
- !ruby/object:Gem::Version
|
374
|
-
version: '5.16'
|
375
|
-
- !ruby/object:Gem::Dependency
|
376
|
-
name: mocha
|
377
|
-
requirement: !ruby/object:Gem::Requirement
|
378
|
-
requirements:
|
379
|
-
- - "~>"
|
380
|
-
- !ruby/object:Gem::Version
|
381
|
-
version: '1.1'
|
382
|
-
type: :development
|
383
|
-
prerelease: false
|
384
|
-
version_requirements: !ruby/object:Gem::Requirement
|
385
|
-
requirements:
|
386
|
-
- - "~>"
|
387
|
-
- !ruby/object:Gem::Version
|
388
|
-
version: '1.1'
|
389
231
|
description: Test Kitchen is an integration tool for developing and testing infrastructure
|
390
232
|
code and software on isolated target platforms.
|
391
233
|
email:
|
@@ -514,14 +356,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
514
356
|
requirements:
|
515
357
|
- - ">="
|
516
358
|
- !ruby/object:Gem::Version
|
517
|
-
version: '
|
359
|
+
version: '3.1'
|
518
360
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
519
361
|
requirements:
|
520
362
|
- - ">="
|
521
363
|
- !ruby/object:Gem::Version
|
522
364
|
version: '0'
|
523
365
|
requirements: []
|
524
|
-
rubygems_version: 3.
|
366
|
+
rubygems_version: 3.4.10
|
525
367
|
signing_key:
|
526
368
|
specification_version: 4
|
527
369
|
summary: Test Kitchen is an integration tool for developing and testing infrastructure
|