test-kitchen 2.3.3 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/kitchen.rb +30 -30
  4. data/lib/kitchen/cli.rb +2 -2
  5. data/lib/kitchen/command/action.rb +3 -3
  6. data/lib/kitchen/command/console.rb +1 -1
  7. data/lib/kitchen/command/diagnose.rb +2 -2
  8. data/lib/kitchen/command/doctor.rb +1 -1
  9. data/lib/kitchen/command/exec.rb +1 -1
  10. data/lib/kitchen/command/list.rb +1 -1
  11. data/lib/kitchen/command/login.rb +1 -1
  12. data/lib/kitchen/command/package.rb +1 -1
  13. data/lib/kitchen/command/sink.rb +1 -1
  14. data/lib/kitchen/command/test.rb +3 -3
  15. data/lib/kitchen/configurable.rb +7 -1
  16. data/lib/kitchen/data_munger.rb +1 -1
  17. data/lib/kitchen/diagnostic.rb +2 -2
  18. data/lib/kitchen/driver.rb +1 -1
  19. data/lib/kitchen/driver/base.rb +5 -5
  20. data/lib/kitchen/driver/dummy.rb +1 -1
  21. data/lib/kitchen/driver/exec.rb +4 -4
  22. data/lib/kitchen/driver/proxy.rb +2 -2
  23. data/lib/kitchen/driver/ssh_base.rb +1 -1
  24. data/lib/kitchen/generator/init.rb +2 -2
  25. data/lib/kitchen/lifecycle_hooks.rb +2 -2
  26. data/lib/kitchen/loader/yaml.rb +1 -1
  27. data/lib/kitchen/plugin.rb +2 -2
  28. data/lib/kitchen/provisioner.rb +1 -1
  29. data/lib/kitchen/provisioner/base.rb +3 -3
  30. data/lib/kitchen/provisioner/chef/berkshelf.rb +2 -2
  31. data/lib/kitchen/provisioner/chef/policyfile.rb +13 -6
  32. data/lib/kitchen/provisioner/chef_apply.rb +1 -1
  33. data/lib/kitchen/provisioner/chef_base.rb +14 -13
  34. data/lib/kitchen/provisioner/chef_solo.rb +1 -1
  35. data/lib/kitchen/provisioner/chef_zero.rb +1 -1
  36. data/lib/kitchen/provisioner/dummy.rb +1 -1
  37. data/lib/kitchen/provisioner/shell.rb +8 -4
  38. data/lib/kitchen/rake_tasks.rb +1 -1
  39. data/lib/kitchen/ssh.rb +2 -2
  40. data/lib/kitchen/thor_tasks.rb +1 -1
  41. data/lib/kitchen/transport.rb +1 -1
  42. data/lib/kitchen/transport/base.rb +5 -5
  43. data/lib/kitchen/transport/dummy.rb +1 -1
  44. data/lib/kitchen/transport/exec.rb +3 -3
  45. data/lib/kitchen/transport/ssh.rb +1 -1
  46. data/lib/kitchen/transport/winrm.rb +1 -1
  47. data/lib/kitchen/util.rb +1 -1
  48. data/lib/kitchen/verifier.rb +1 -1
  49. data/lib/kitchen/verifier/base.rb +10 -3
  50. data/lib/kitchen/verifier/busser.rb +1 -1
  51. data/lib/kitchen/verifier/dummy.rb +1 -1
  52. data/lib/kitchen/verifier/shell.rb +1 -1
  53. data/lib/kitchen/version.rb +1 -1
  54. data/support/chef_base_install_command.ps1 +3 -3
  55. data/support/chef_base_install_command.sh +2 -2
  56. data/templates/init/chefignore.erb +1 -0
  57. data/test-kitchen.gemspec +7 -7
  58. metadata +36 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34c410800999eeef2338cb3954d3784a13c0bc827111ef2e5a4af90b9d84be2f
4
- data.tar.gz: ca8e03f5bd16c3bb89c73abc26e839c5a75299ce8fdd976f480627bce2b81cf2
3
+ metadata.gz: f64adcadcfffbb97c3c6cf5a53c70b592f913fa047a8d0eeb0005cd9465c3ba0
4
+ data.tar.gz: d94b2819e5f73b83beba6016b036d99c1cd02f81dd6c9596b1d46f146311f618
5
5
  SHA512:
6
- metadata.gz: 70e91eeb4057e9032d4583609d80f2ca75eb5940c81e7c7e0efae0e51c2c4cd8d294b911a6862e6c4a32123caf63bbd90f721504ee2636d44d83771540e8d6a9
7
- data.tar.gz: c032bc41d53cdd1486a9d2b2158d41f190b292735eb82f07ce1f957876a7af55d1dc06f12bc44be4f03b47e14e87b0f28fd5f4d660d797aef1ee23f05cbec8c1
6
+ metadata.gz: 2f1988e66f7e15097d664e414579f9b2520ebea535bdfdc80ab159cfb2306c1a783559750d579390436b104aca0e8af2ee8d1f160a1119accc5c15dfae97e068
7
+ data.tar.gz: d8c9cd609f9257f934c7e2070b6b1fe95093295d0dfd99d205fdc93575892732b543a893753006184a0b66bf4811fe0f87981229e45966004504b9677ff64358
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group :integration do
10
10
  end
11
11
 
12
12
  group :changelog do
13
- gem "github_changelog_generator", "1.14.3"
13
+ gem "github_changelog_generator", "1.15.2"
14
14
  end
15
15
 
16
16
  group :debug do
@@ -19,36 +19,36 @@
19
19
  require "pathname"
20
20
  require "thread"
21
21
 
22
- require "kitchen/errors"
23
- require "kitchen/logger"
24
- require "kitchen/logging"
25
- require "kitchen/shell_out"
26
- require "kitchen/configurable"
27
- require "kitchen/util"
28
-
29
- require "kitchen/provisioner"
30
- require "kitchen/provisioner/base"
31
- require "kitchen/color"
32
- require "kitchen/collection"
33
- require "kitchen/config"
34
- require "kitchen/data_munger"
35
- require "kitchen/driver"
36
- require "kitchen/driver/base"
37
- require "kitchen/driver/ssh_base"
38
- require "kitchen/driver/proxy"
39
- require "kitchen/instance"
40
- require "kitchen/lifecycle_hooks"
41
- require "kitchen/transport"
42
- require "kitchen/transport/base"
43
- require "kitchen/loader/yaml"
44
- require "kitchen/metadata_chopper"
45
- require "kitchen/platform"
46
- require "kitchen/state_file"
47
- require "kitchen/ssh"
48
- require "kitchen/suite"
49
- require "kitchen/verifier"
50
- require "kitchen/verifier/base"
51
- require "kitchen/version"
22
+ require_relative "kitchen/errors"
23
+ require_relative "kitchen/logger"
24
+ require_relative "kitchen/logging"
25
+ require_relative "kitchen/shell_out"
26
+ require_relative "kitchen/configurable"
27
+ require_relative "kitchen/util"
28
+
29
+ require_relative "kitchen/provisioner"
30
+ require_relative "kitchen/provisioner/base"
31
+ require_relative "kitchen/color"
32
+ require_relative "kitchen/collection"
33
+ require_relative "kitchen/config"
34
+ require_relative "kitchen/data_munger"
35
+ require_relative "kitchen/driver"
36
+ require_relative "kitchen/driver/base"
37
+ require_relative "kitchen/driver/ssh_base"
38
+ require_relative "kitchen/driver/proxy"
39
+ require_relative "kitchen/instance"
40
+ require_relative "kitchen/lifecycle_hooks"
41
+ require_relative "kitchen/transport"
42
+ require_relative "kitchen/transport/base"
43
+ require_relative "kitchen/loader/yaml"
44
+ require_relative "kitchen/metadata_chopper"
45
+ require_relative "kitchen/platform"
46
+ require_relative "kitchen/state_file"
47
+ require_relative "kitchen/ssh"
48
+ require_relative "kitchen/suite"
49
+ require_relative "kitchen/verifier"
50
+ require_relative "kitchen/verifier/base"
51
+ require_relative "kitchen/version"
52
52
 
53
53
  # Test Kitchen base module.
54
54
  #
@@ -18,8 +18,8 @@
18
18
 
19
19
  require "thor"
20
20
 
21
- require "kitchen"
22
- require "kitchen/generator/init"
21
+ require_relative "../kitchen"
22
+ require_relative "generator/init"
23
23
 
24
24
  module Kitchen
25
25
  # The command line runner for Kitchen.
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  require "benchmark"
22
22
 
@@ -30,12 +30,12 @@ module Kitchen
30
30
 
31
31
  # Invoke the command.
32
32
  def call
33
- banner "Starting Kitchen (v#{Kitchen::VERSION})"
33
+ banner "Starting Test Kitchen (v#{Kitchen::VERSION})"
34
34
  elapsed = Benchmark.measure do
35
35
  results = parse_subcommand(args.first)
36
36
  run_action(action, results)
37
37
  end
38
- banner "Kitchen is finished. #{Util.duration(elapsed.real)}"
38
+ banner "Test Kitchen is finished. #{Util.duration(elapsed.real)}"
39
39
  end
40
40
  end
41
41
  end
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  module Kitchen
22
22
  module Command
@@ -16,8 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
20
- require "kitchen/diagnostic"
19
+ require_relative "../command"
20
+ require_relative "../diagnostic"
21
21
 
22
22
  require "yaml"
23
23
 
@@ -13,7 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- require "kitchen/command"
16
+ require_relative "../command"
17
17
 
18
18
  module Kitchen
19
19
  module Command
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  module Kitchen
22
22
  module Command
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
  require "json"
21
21
 
22
22
  module Kitchen
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  module Kitchen
22
22
  module Command
@@ -13,7 +13,7 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- require "kitchen/command"
16
+ require_relative "../command"
17
17
 
18
18
  module Kitchen
19
19
  module Command
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  module Kitchen
22
22
  module Command
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/command"
19
+ require_relative "../command"
20
20
 
21
21
  require "benchmark"
22
22
 
@@ -34,14 +34,14 @@ module Kitchen
34
34
  raise ArgumentError, "Destroy mode must be passing, always, or never."
35
35
  end
36
36
 
37
- banner "Starting Kitchen (v#{Kitchen::VERSION})"
37
+ banner "Starting Test Kitchen (v#{Kitchen::VERSION})"
38
38
  elapsed = Benchmark.measure do
39
39
  destroy_mode = options[:destroy].to_sym
40
40
  results = parse_subcommand(args.join("|"))
41
41
 
42
42
  run_action(:test, results, destroy_mode)
43
43
  end
44
- banner "Kitchen is finished. #{Util.duration(elapsed.real)}"
44
+ banner "Test Kitchen is finished. #{Util.duration(elapsed.real)}"
45
45
  end
46
46
  end
47
47
  end
@@ -18,7 +18,7 @@
18
18
 
19
19
  require "thor/util"
20
20
 
21
- require "kitchen/lazy_hash"
21
+ require_relative "lazy_hash"
22
22
 
23
23
  module Kitchen
24
24
  # A mixin for providing configuration-related behavior such as default
@@ -349,6 +349,12 @@ module Kitchen
349
349
  code_parts = resolve_proxy_settings_from_config
350
350
  code_parts << shell_env_var("TEST_KITCHEN", 1)
351
351
  code_parts << shell_env_var("CI", ENV["CI"]) if ENV["CI"]
352
+ code_parts << shell_env_var("CHEF_LICENSE", ENV["CHEF_LICENSE"]) if ENV["CHEF_LICENSE"]
353
+ ENV.select { |key, value| key.start_with?("TKENV_") }.each do |key, value|
354
+ env_var_name = "#{key}".sub!("TKENV_", "")
355
+ code_parts << shell_env_var(env_var_name, value)
356
+ end
357
+
352
358
  code_parts << code
353
359
  code_parts.join("\n")
354
360
  end
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "vendor/hash_recursive_merge"
19
+ require_relative "../vendor/hash_recursive_merge"
20
20
 
21
21
  module Kitchen
22
22
  # Class to handle recursive merging of configuration between platforms,
@@ -16,8 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/util"
20
- require "kitchen/version"
19
+ require_relative "util"
20
+ require_relative "version"
21
21
 
22
22
  module Kitchen
23
23
  # Combines and compiles diagnostic information about a Test Kitchen
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/plugin"
19
+ require_relative "plugin"
20
20
 
21
21
  module Kitchen
22
22
  # A driver is responsible for carrying out the lifecycle activities of an
@@ -16,11 +16,11 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/configurable"
20
- require "kitchen/errors"
21
- require "kitchen/lazy_hash"
22
- require "kitchen/logging"
23
- require "kitchen/shell_out"
19
+ require_relative "../configurable"
20
+ require_relative "../errors"
21
+ require_relative "../lazy_hash"
22
+ require_relative "../logging"
23
+ require_relative "../shell_out"
24
24
 
25
25
  module Kitchen
26
26
  module Driver
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen"
19
+ require_relative "../../kitchen"
20
20
 
21
21
  module Kitchen
22
22
  module Driver
@@ -13,10 +13,10 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
- require "kitchen/driver/base"
17
- require "kitchen/shell_out"
18
- require "kitchen/transport/exec"
19
- require "kitchen/version"
16
+ require_relative "base"
17
+ require_relative "../shell_out"
18
+ require_relative "../transport/exec"
19
+ require_relative "../version"
20
20
 
21
21
  module Kitchen
22
22
  module Driver
@@ -18,8 +18,8 @@
18
18
  # limitations under the License.
19
19
  #
20
20
 
21
- require "kitchen/driver/ssh_base"
22
- require "kitchen/version"
21
+ require_relative "ssh_base"
22
+ require_relative "../version"
23
23
 
24
24
  module Kitchen
25
25
  module Driver
@@ -18,7 +18,7 @@
18
18
 
19
19
  require "thor/util"
20
20
 
21
- require "kitchen/lazy_hash"
21
+ require_relative "../lazy_hash"
22
22
  require "benchmark"
23
23
 
24
24
  module Kitchen
@@ -136,7 +136,7 @@ module Kitchen
136
136
  rakedoc = <<-RAKE.gsub(/^ {10}/, "")
137
137
 
138
138
  begin
139
- require 'kitchen/rake_tasks'
139
+ require_relative '../rake_tasks'
140
140
  Kitchen::RakeTasks.new
141
141
  rescue LoadError
142
142
  puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
@@ -154,7 +154,7 @@ module Kitchen
154
154
  thordoc = <<-THOR.gsub(/^ {10}/, "")
155
155
 
156
156
  begin
157
- require 'kitchen/thor_tasks'
157
+ require_relative '../thor_tasks'
158
158
  Kitchen::ThorTasks.new
159
159
  rescue LoadError
160
160
  puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
@@ -16,8 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/errors"
20
- require "kitchen/shell_out"
19
+ require_relative "errors"
20
+ require_relative "shell_out"
21
21
 
22
22
  module Kitchen
23
23
  # A helper object used by {Instance} to coordinate lifecycle hook calls from
@@ -17,7 +17,7 @@
17
17
  # limitations under the License.
18
18
 
19
19
  require "erb"
20
- require "vendor/hash_recursive_merge"
20
+ require_relative "../../vendor/hash_recursive_merge"
21
21
  require "yaml"
22
22
 
23
23
  module Kitchen
@@ -17,8 +17,8 @@
17
17
  # See the License for the specific language governing permissions and
18
18
  # limitations under the License.
19
19
 
20
- require "kitchen/errors"
21
- require "kitchen/util"
20
+ require_relative "errors"
21
+ require_relative "util"
22
22
 
23
23
  module Kitchen
24
24
  module Plugin
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/plugin"
19
+ require_relative "plugin"
20
20
 
21
21
  module Kitchen
22
22
  # A provisioner is responsible for generating the commands necessary to
@@ -16,9 +16,9 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/configurable"
20
- require "kitchen/errors"
21
- require "kitchen/logging"
19
+ require_relative "../configurable"
20
+ require_relative "../errors"
21
+ require_relative "../logging"
22
22
 
23
23
  module Kitchen
24
24
  module Provisioner
@@ -16,8 +16,8 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/errors"
20
- require "kitchen/logging"
19
+ require_relative "../../errors"
20
+ require_relative "../../logging"
21
21
 
22
22
  module Kitchen
23
23
  module Provisioner
@@ -19,9 +19,9 @@
19
19
  require "shellwords"
20
20
  require "rbconfig"
21
21
 
22
- require "kitchen/errors"
23
- require "kitchen/logging"
24
- require "kitchen/shell_out"
22
+ require_relative "../../errors"
23
+ require_relative "../../logging"
24
+ require_relative "../../shell_out"
25
25
 
26
26
  module Kitchen
27
27
  module Provisioner
@@ -136,13 +136,20 @@ module Kitchen
136
136
  # @raise [UserError] if the `chef` command is not in the PATH
137
137
  # @api private
138
138
  def detect_chef_command!(logger)
139
- unless ENV["PATH"].split(File::PATH_SEPARATOR).any? do |p|
140
- File.exist?(File.join(p, "chef"))
139
+ unless ENV["PATH"].split(File::PATH_SEPARATOR).any? do |path|
140
+ if RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
141
+ # Windows could have different extentions: BAT, EXE or NONE
142
+ %w{chef chef.exe chef.bat}.each do |bin|
143
+ File.exist?(File.join(path, bin))
144
+ end
145
+ else
146
+ File.exist?(File.join(path, "chef"))
147
+ end
141
148
  end
142
149
  logger.fatal("The `chef` executable cannot be found in your " \
143
150
  "PATH. Ensure you have installed ChefDK or Chef Workstation " \
144
151
  "from https://downloads.chef.io and that your PATH " \
145
- "setting includes the path to the `chef` comand.")
152
+ "setting includes the path to the `chef` command.")
146
153
  raise UserError,
147
154
  "Could not find the chef executable in your PATH."
148
155
  end
@@ -45,7 +45,7 @@
45
45
  # chef-apply apply/recipe1.rb
46
46
  # chef-apply apply/recipe2.rb
47
47
 
48
- require "kitchen/provisioner/chef_base"
48
+ require_relative "chef_base"
49
49
 
50
50
  module Kitchen
51
51
  module Provisioner
@@ -21,10 +21,10 @@ require "pathname"
21
21
  require "json"
22
22
  require "cgi"
23
23
 
24
- require "kitchen/provisioner/chef/policyfile"
25
- require "kitchen/provisioner/chef/berkshelf"
26
- require "kitchen/provisioner/chef/common_sandbox"
27
- require "kitchen/util"
24
+ require_relative "chef/policyfile"
25
+ require_relative "chef/berkshelf"
26
+ require_relative "chef/common_sandbox"
27
+ require_relative "../util"
28
28
  require "mixlib/install"
29
29
  require "mixlib/install/script_generator"
30
30
  require "license_acceptance/acceptor"
@@ -69,6 +69,7 @@ module Kitchen
69
69
  README.* VERSION metadata.{json,rb} attributes.rb recipe.rb
70
70
  attributes/**/* definitions/**/* files/**/* libraries/**/*
71
71
  providers/**/* recipes/**/* resources/**/* templates/**/*
72
+ ohai/**/*
72
73
  ).join(",")
73
74
  # to ease upgrades, allow the user to turn deprecation warnings into errors
74
75
  default_config :deprecations_as_errors, false
@@ -153,7 +154,7 @@ module Kitchen
153
154
 
154
155
  # New Usage #
155
156
  provisioner:
156
- product_name: <chef or chefdk>
157
+ product_name: <chef or chef-workstation>
157
158
  install_strategy: skip
158
159
  MSG
159
160
  when provisioner[:require_chef_omnibus].to_s.match(/\d/)
@@ -166,7 +167,7 @@ module Kitchen
166
167
 
167
168
  # New Usage #
168
169
  provisioner:
169
- product_name: <chef or chefdk>
170
+ product_name: <chef or chef-workstation>
170
171
  product_version: #{provisioner[:require_chef_omnibus]}
171
172
  MSG
172
173
  when provisioner[:require_chef_omnibus] == "latest"
@@ -179,7 +180,7 @@ module Kitchen
179
180
 
180
181
  # New Usage #
181
182
  provisioner:
182
- product_name: <chef or chefdk>
183
+ product_name: <chef or chef-workstation>
183
184
  install_strategy: always
184
185
  MSG
185
186
  end
@@ -199,11 +200,11 @@ module Kitchen
199
200
 
200
201
  # Deprecated Example #
201
202
  provisioner:
202
- chef_omnibus_install_options: -P chefdk -c current
203
+ chef_omnibus_install_options: -P chef-workstation -c current
203
204
 
204
205
  # New Usage #
205
206
  provisioner:
206
- product_name: chefdk
207
+ product_name: chef-workstation
207
208
  channel: current
208
209
  MSG
209
210
 
@@ -216,7 +217,7 @@ module Kitchen
216
217
 
217
218
  # New Usage #
218
219
  provisioner:
219
- product_name: <chef or chefdk>
220
+ product_name: <chef or chef-workstation>
220
221
  download_url: http://direct-download-url
221
222
  MSG
222
223
 
@@ -225,9 +226,9 @@ module Kitchen
225
226
  fully managed by using attribute settings.
226
227
  MSG
227
228
 
228
- # Reads the local Chef::Config object (if present). We do this because
229
- # we want to start bring Chef config and ChefDK tool config closer
230
- # together. For example, we want to configure proxy settings in 1
229
+ # Reads the local Chef::Config object (if present). We do this because
230
+ # we want to start bring Chef config and Chef Workstation config closer
231
+ # together. For example, we want to configure proxy settings in 1
231
232
  # location instead of 3 configuration files.
232
233
  #
233
234
  # @param config [Hash] initial provided configuration
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/provisioner/chef_base"
19
+ require_relative "chef_base"
20
20
 
21
21
  module Kitchen
22
22
  module Provisioner
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/provisioner/chef_base"
19
+ require_relative "chef_base"
20
20
 
21
21
  module Kitchen
22
22
  module Provisioner
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen"
19
+ require_relative "../../kitchen"
20
20
 
21
21
  module Kitchen
22
22
  module Provisioner
@@ -18,8 +18,8 @@
18
18
 
19
19
  require "shellwords"
20
20
 
21
- require "kitchen/provisioner/base"
22
- require "kitchen/version"
21
+ require_relative "base"
22
+ require_relative "../version"
23
23
 
24
24
  module Kitchen
25
25
  module Provisioner
@@ -106,13 +106,17 @@ module Kitchen
106
106
 
107
107
  if config[:arguments] && !config[:arguments].empty?
108
108
  if config[:arguments].is_a?(Array)
109
- script = Shellwords.join([script] + config[:arguments])
109
+ if powershell_shell?
110
+ script = ([script] + config[:arguments]).join(" ")
111
+ else
112
+ script = Shellwords.join([script] + config[:arguments])
113
+ end
110
114
  else
111
115
  script.concat(" ").concat(config[:arguments].to_s)
112
116
  end
113
117
  end
114
118
 
115
- code = powershell_shell? ? %{& "#{script}"} : sudo(script)
119
+ code = powershell_shell? ? %{& #{script}} : sudo(script)
116
120
 
117
121
  prefix_command(wrap_shell_code(code))
118
122
  end
@@ -18,7 +18,7 @@
18
18
 
19
19
  require "rake/tasklib"
20
20
 
21
- require "kitchen"
21
+ require_relative "../kitchen"
22
22
 
23
23
  module Kitchen
24
24
  # Kitchen Rake task generator.
@@ -21,8 +21,8 @@ require "net/ssh"
21
21
  require "net/scp"
22
22
  require "socket"
23
23
 
24
- require "kitchen/errors"
25
- require "kitchen/login_command"
24
+ require_relative "errors"
25
+ require_relative "login_command"
26
26
 
27
27
  module Kitchen
28
28
  # Wrapped exception for any internally raised SSH-related errors.
@@ -18,7 +18,7 @@
18
18
 
19
19
  require "thor"
20
20
 
21
- require "kitchen"
21
+ require_relative "../kitchen"
22
22
 
23
23
  module Kitchen
24
24
  # Kitchen Thor task generator.
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/plugin"
19
+ require_relative "plugin"
20
20
 
21
21
  module Kitchen
22
22
  # A transport is responsible for the communication with an instance,
@@ -17,11 +17,11 @@
17
17
  # See the License for the specific language governing permissions and
18
18
  # limitations under the License.
19
19
 
20
- require "kitchen/configurable"
21
- require "kitchen/errors"
22
- require "kitchen/lazy_hash"
23
- require "kitchen/logging"
24
- require "kitchen/login_command"
20
+ require_relative "../configurable"
21
+ require_relative "../errors"
22
+ require_relative "../lazy_hash"
23
+ require_relative "../logging"
24
+ require_relative "../login_command"
25
25
 
26
26
  module Kitchen
27
27
  module Transport
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen"
19
+ require_relative "../../kitchen"
20
20
 
21
21
  module Kitchen
22
22
  module Transport
@@ -14,9 +14,9 @@
14
14
 
15
15
  require "fileutils"
16
16
 
17
- require "kitchen/shell_out"
18
- require "kitchen/transport/base"
19
- require "kitchen/version"
17
+ require_relative "../shell_out"
18
+ require_relative "base"
19
+ require_relative "../version"
20
20
 
21
21
  module Kitchen
22
22
  module Transport
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen"
19
+ require_relative "../../kitchen"
20
20
 
21
21
  require "fileutils"
22
22
  require "net/ssh"
@@ -20,7 +20,7 @@
20
20
 
21
21
  require "rbconfig"
22
22
  require "uri"
23
- require "kitchen"
23
+ require_relative "../../kitchen"
24
24
  require "winrm"
25
25
 
26
26
  module Kitchen
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/errors"
19
+ require_relative "errors"
20
20
  require "thor/util"
21
21
 
22
22
  module Kitchen
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/plugin"
19
+ require_relative "plugin"
20
20
 
21
21
  module Kitchen
22
22
  # A verifier is responsible for running tests post-converge to confirm that
@@ -16,9 +16,9 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/errors"
20
- require "kitchen/configurable"
21
- require "kitchen/logging"
19
+ require_relative "../errors"
20
+ require_relative "../configurable"
21
+ require_relative "../logging"
22
22
 
23
23
  module Kitchen
24
24
  module Verifier
@@ -75,6 +75,13 @@ module Kitchen
75
75
  debug("Transfer complete")
76
76
  conn.execute(prepare_command)
77
77
  conn.execute(run_command)
78
+
79
+ info("Downloading files from #{instance.to_str}")
80
+ config[:downloads].to_h.each do |remotes, local|
81
+ debug("Downloading #{Array(remotes).join(", ")} to #{local}")
82
+ conn.download(remotes, local)
83
+ end
84
+ debug("Download complete")
78
85
  end
79
86
  rescue Kitchen::Transport::TransportFailed => ex
80
87
  raise ActionFailed, ex.message
@@ -19,7 +19,7 @@
19
19
  require "base64"
20
20
  require "digest"
21
21
 
22
- require "kitchen/verifier/base"
22
+ require_relative "base"
23
23
 
24
24
  module Kitchen
25
25
  module Verifier
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/verifier/base"
19
+ require_relative "base"
20
20
 
21
21
  module Kitchen
22
22
  module Verifier
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require "kitchen/verifier/base"
19
+ require_relative "base"
20
20
 
21
21
  module Kitchen
22
22
  module Verifier
@@ -17,5 +17,5 @@
17
17
  # limitations under the License.
18
18
 
19
19
  module Kitchen
20
- VERSION = "2.3.3".freeze
20
+ VERSION = "2.5.2".freeze
21
21
  end
@@ -44,7 +44,7 @@ Function Download-Chef($md_url, $dst) {
44
44
  }
45
45
 
46
46
  Function Install-Chef($msi) {
47
- Log "Installing Chef package $msi"
47
+ Log "Installing Chef Infra Client package $msi"
48
48
  $p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi" -Passthru -Wait
49
49
 
50
50
  if ($p.ExitCode -ne 0) { throw "msiexec was not successful. Received exit code $($p.ExitCode)" }
@@ -73,11 +73,11 @@ Try {
73
73
  $msi = Unresolve-Path $msi
74
74
 
75
75
  if (Check-UpdateChef $chef_omnibus_root $version) {
76
- Write-Host "-----> Installing Chef package ($pretty_version)`n"
76
+ Write-Host "-----> Installing Chef Infra Client package ($pretty_version)`n"
77
77
  Download-Chef "$chef_metadata_url" $msi
78
78
  Install-Chef $msi
79
79
  } else {
80
- Write-Host "-----> Chef package installation detected ($pretty_version)`n"
80
+ Write-Host "-----> Chef Infra Client package installation detected ($pretty_version)`n"
81
81
  }
82
82
  Catch {
83
83
  Write-Error ($_ | ft -Property * | out-string) -ErrorAction Continue
@@ -206,7 +206,7 @@ unable_to_download() {
206
206
  main() {
207
207
  should_update_chef "$chef_omnibus_root" "$version"
208
208
  if test $? -eq 0; then
209
- echo "-----> Installing Chef package (${pretty_version})";
209
+ echo "-----> Installing Chef Infra Client package (${pretty_version})";
210
210
 
211
211
  # solaris 10 lacks recent enough credentials, so http url is used
212
212
  platform="`/usr/bin/uname -s 2>/dev/null`";
@@ -218,7 +218,7 @@ main() {
218
218
  do_download "$chef_omnibus_url" /tmp/install.sh;
219
219
  $sudo_sh /tmp/install.sh $install_flags;
220
220
  else
221
- echo "-----> Chef package installation detected (${pretty_version})";
221
+ echo "-----> Chef Infra Client package installation detected (${pretty_version})";
222
222
  fi
223
223
  }
224
224
 
@@ -1 +1,2 @@
1
1
  .kitchen
2
+ kitchen*.yml
@@ -24,12 +24,12 @@ Gem::Specification.new do |gem|
24
24
  gem.required_ruby_version = ">= 2.3"
25
25
 
26
26
  gem.add_dependency "mixlib-shellout", ">= 1.2", "< 4.0"
27
- gem.add_dependency "net-scp", ">= 1.1", "< 3.0" # pinning until we can confirm 3+ works
28
- gem.add_dependency "net-ssh", ">= 2.9", "< 6.0" # pinning until we can confirm 6+ works
27
+ gem.add_dependency "net-scp", ">= 1.1", "< 4.0" # pinning until we can confirm 4+ works
28
+ gem.add_dependency "net-ssh", ">= 2.9", "< 7.0" # pinning until we can confirm 7+ works
29
29
  gem.add_dependency "net-ssh-gateway", ">= 1.2", "< 3.0" # pinning until we can confirm 3+ works
30
30
  gem.add_dependency "ed25519", "~> 1.2" # ed25519 ssh key support
31
31
  gem.add_dependency "bcrypt_pbkdf", "~> 1.0" # ed25519 ssh key support
32
- gem.add_dependency "thor", "~> 0.19"
32
+ gem.add_dependency "thor", ">= 0.19", "< 2.0"
33
33
  gem.add_dependency "mixlib-install", "~> 3.6"
34
34
  gem.add_dependency "winrm", "~> 2.0"
35
35
  gem.add_dependency "winrm-elevated", "~> 1.0"
@@ -42,11 +42,11 @@ Gem::Specification.new do |gem|
42
42
  gem.add_development_dependency "bundler"
43
43
  gem.add_development_dependency "rake"
44
44
 
45
- gem.add_development_dependency "aruba", "~> 0.11"
46
- gem.add_development_dependency "fakefs", "~> 0.4"
47
- gem.add_development_dependency "minitest", "~> 5.3", "< 5.11"
45
+ gem.add_development_dependency "aruba", "~> 0.11", "< 1.0"
46
+ gem.add_development_dependency "fakefs", "~> 1.0"
47
+ gem.add_development_dependency "minitest", "~> 5.3", "< 5.12"
48
48
  gem.add_development_dependency "mocha", "~> 1.1"
49
- gem.add_development_dependency "cucumber", "~> 2.1"
49
+ gem.add_development_dependency "cucumber", ">= 2.1", "< 4.0" # we just need to validate 4.0 when it comes out
50
50
  gem.add_development_dependency "countloc", "~> 0.4"
51
51
  gem.add_development_dependency "maruku", "~> 0.6"
52
52
  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.3.3
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-18 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '3.0'
42
+ version: '4.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '1.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '3.0'
52
+ version: '4.0'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: net-ssh
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '2.9'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '6.0'
62
+ version: '7.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '2.9'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '6.0'
72
+ version: '7.0'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: net-ssh-gateway
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -122,16 +122,22 @@ dependencies:
122
122
  name: thor
123
123
  requirement: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - "~>"
125
+ - - ">="
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0.19'
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '2.0'
128
131
  type: :runtime
129
132
  prerelease: false
130
133
  version_requirements: !ruby/object:Gem::Requirement
131
134
  requirements:
132
- - - "~>"
135
+ - - ">="
133
136
  - !ruby/object:Gem::Version
134
137
  version: '0.19'
138
+ - - "<"
139
+ - !ruby/object:Gem::Version
140
+ version: '2.0'
135
141
  - !ruby/object:Gem::Dependency
136
142
  name: mixlib-install
137
143
  requirement: !ruby/object:Gem::Requirement
@@ -257,6 +263,9 @@ dependencies:
257
263
  - - "~>"
258
264
  - !ruby/object:Gem::Version
259
265
  version: '0.11'
266
+ - - "<"
267
+ - !ruby/object:Gem::Version
268
+ version: '1.0'
260
269
  type: :development
261
270
  prerelease: false
262
271
  version_requirements: !ruby/object:Gem::Requirement
@@ -264,20 +273,23 @@ dependencies:
264
273
  - - "~>"
265
274
  - !ruby/object:Gem::Version
266
275
  version: '0.11'
276
+ - - "<"
277
+ - !ruby/object:Gem::Version
278
+ version: '1.0'
267
279
  - !ruby/object:Gem::Dependency
268
280
  name: fakefs
269
281
  requirement: !ruby/object:Gem::Requirement
270
282
  requirements:
271
283
  - - "~>"
272
284
  - !ruby/object:Gem::Version
273
- version: '0.4'
285
+ version: '1.0'
274
286
  type: :development
275
287
  prerelease: false
276
288
  version_requirements: !ruby/object:Gem::Requirement
277
289
  requirements:
278
290
  - - "~>"
279
291
  - !ruby/object:Gem::Version
280
- version: '0.4'
292
+ version: '1.0'
281
293
  - !ruby/object:Gem::Dependency
282
294
  name: minitest
283
295
  requirement: !ruby/object:Gem::Requirement
@@ -287,7 +299,7 @@ dependencies:
287
299
  version: '5.3'
288
300
  - - "<"
289
301
  - !ruby/object:Gem::Version
290
- version: '5.11'
302
+ version: '5.12'
291
303
  type: :development
292
304
  prerelease: false
293
305
  version_requirements: !ruby/object:Gem::Requirement
@@ -297,7 +309,7 @@ dependencies:
297
309
  version: '5.3'
298
310
  - - "<"
299
311
  - !ruby/object:Gem::Version
300
- version: '5.11'
312
+ version: '5.12'
301
313
  - !ruby/object:Gem::Dependency
302
314
  name: mocha
303
315
  requirement: !ruby/object:Gem::Requirement
@@ -316,16 +328,22 @@ dependencies:
316
328
  name: cucumber
317
329
  requirement: !ruby/object:Gem::Requirement
318
330
  requirements:
319
- - - "~>"
331
+ - - ">="
320
332
  - !ruby/object:Gem::Version
321
333
  version: '2.1'
334
+ - - "<"
335
+ - !ruby/object:Gem::Version
336
+ version: '4.0'
322
337
  type: :development
323
338
  prerelease: false
324
339
  version_requirements: !ruby/object:Gem::Requirement
325
340
  requirements:
326
- - - "~>"
341
+ - - ">="
327
342
  - !ruby/object:Gem::Version
328
343
  version: '2.1'
344
+ - - "<"
345
+ - !ruby/object:Gem::Version
346
+ version: '4.0'
329
347
  - !ruby/object:Gem::Dependency
330
348
  name: countloc
331
349
  requirement: !ruby/object:Gem::Requirement
@@ -466,7 +484,7 @@ homepage: https://kitchen.ci/
466
484
  licenses:
467
485
  - Apache-2.0
468
486
  metadata: {}
469
- post_install_message:
487
+ post_install_message:
470
488
  rdoc_options: []
471
489
  require_paths:
472
490
  - lib
@@ -481,8 +499,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
481
499
  - !ruby/object:Gem::Version
482
500
  version: '0'
483
501
  requirements: []
484
- rubygems_version: 3.0.3
485
- signing_key:
502
+ rubygems_version: 3.1.2
503
+ signing_key:
486
504
  specification_version: 4
487
505
  summary: Test Kitchen is an integration tool for developing and testing infrastructure
488
506
  code and software on isolated target platforms.