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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0640246228199bba84492ed9e4b1261d15afcbc5565718a071d500c3b2ae0a3d'
4
- data.tar.gz: a697dabc83dc08a3ea1170af7cd0a9c5db500fbae05db675f62e67a65ecd7edb
3
+ metadata.gz: ecd483d58546fb48da8bb5a4e5c448b7cc2f8b7d2c0082d0df4b023c380a2594
4
+ data.tar.gz: cb42f2dae4d33d84ff8515a7412d7e1d14c358504f66429b21465bef7714e48b
5
5
  SHA512:
6
- metadata.gz: 3f6b6482f458207ea554865365984a3ea67c9e44948c9f62145dfae24e96dc745c2d383488a0b24990a16a6e265d1d561c9d7924b45d60c7d514b90ee2a1282e
7
- data.tar.gz: 8baf732f99adb9b5576d30b8a41ea1d6e293566d9615d6f6716a555e13e28541faef94284c337c8eaed59b99b46297681ba682838f62e06bdaf9907797934dd4
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.2"
15
- end
25
+ gem "chefstyle", "2.2.3"
26
+ end
data/lib/kitchen/cli.rb CHANGED
@@ -44,7 +44,7 @@ module Kitchen
44
44
  action: task,
45
45
  help: -> { help(task) },
46
46
  config: @config,
47
- shell: shell,
47
+ shell:,
48
48
  }.merge(additional_options)
49
49
 
50
50
  str_const = Thor::Util.camel_case(command)
@@ -33,7 +33,7 @@ module Kitchen
33
33
  loader = record_failure { load_loader }
34
34
 
35
35
  puts YAML.dump(Kitchen::Diagnostic.new(
36
- loader: loader, instances: instances, plugins: plugins?
36
+ loader:, instances:, plugins: plugins?
37
37
  ).read)
38
38
  end
39
39
 
@@ -216,11 +216,11 @@ module Kitchen
216
216
  /^win/i.match?(platform) ? "winrm" : Transport::DEFAULT_PLUGIN
217
217
  end,
218
218
  },
219
- kitchen_root: kitchen_root,
220
- test_base_path: test_base_path,
221
- log_level: log_level,
222
- log_overwrite: log_overwrite,
223
- debug: 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: suite,
254
- platform: 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: 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: hostname }
302
+ pseudo_state = { hostname: }
303
303
  pseudo_state[:username] = username if username
304
304
  pseudo_state.merge!(options)
305
305
 
@@ -38,7 +38,7 @@ module Kitchen
38
38
  config[:kitchen_root]
39
39
  end
40
40
  # Build the options for mixlib-shellout.
41
- opts = {}.merge(user).merge(cwd: cwd, environment: environment)
41
+ opts = {}.merge(user).merge(cwd:, environment:)
42
42
  run_command(command, opts)
43
43
  end
44
44
 
@@ -58,7 +58,7 @@ module Kitchen
58
58
  #
59
59
  # @return [Hash] a diagnostic hash
60
60
  def diagnose
61
- { os_type: os_type, shell_type: shell_type }
61
+ { os_type:, shell_type: }
62
62
  end
63
63
  end
64
64
  end
@@ -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]*)$}.freeze
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: logger,
290
+ logger:,
291
291
  always_update: config[:always_update_cookbooks],
292
- policy_group: 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: policy_name, policy_group: policy_group)
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: 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: 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 Powershell download scripts.
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: 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: 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: 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: 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: 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 Powershell script over WinRM and return the command's
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] Powershell script to execute
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: logger,
448
- endpoint: 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: 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)
@@ -16,5 +16,5 @@
16
16
  # limitations under the License.
17
17
 
18
18
  module Kitchen
19
- VERSION = "3.5.0".freeze
19
+ VERSION = "3.6.0".freeze
20
20
  end
data/lib/kitchen.rb CHANGED
@@ -91,7 +91,7 @@ module Kitchen
91
91
  stdout: $stdout,
92
92
  logdev: log_location,
93
93
  level: Util.to_logger_level(level),
94
- log_overwrite: log_overwrite
94
+ log_overwrite:
95
95
  )
96
96
  end
97
97
 
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 = ">= 2.7"
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.5.0
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: 2022-12-18 00:00:00.000000000 Z
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: '2.7'
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.3.16
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