test-kitchen 1.23.3 → 1.23.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/version.rb +1 -1
- data/support/chef-client-zero.rb +1 -1
- metadata +5 -324
- data/.gitattributes +0 -3
- data/.github/ISSUE_TEMPLATE.md +0 -56
- data/.github/lock.yml +0 -1
- data/.gitignore +0 -38
- data/.gitmodules +0 -0
- data/.kitchen.appveyor.yml +0 -25
- data/.kitchen.dokken.yml +0 -31
- data/.kitchen.proxy.yml +0 -27
- data/.rubocop.yml +0 -5
- data/.travis.yml +0 -57
- data/.yardopts +0 -3
- data/Berksfile +0 -3
- data/CHANGELOG.md +0 -1510
- data/CONTRIBUTING.md +0 -14
- data/ECOSYSTEM.md +0 -93
- data/Gemfile +0 -40
- data/Gemfile.proxy_tests +0 -4
- data/Guardfile +0 -42
- data/MAINTAINERS.md +0 -29
- data/README.md +0 -138
- data/RELEASE_NOTES.md +0 -167
- data/Rakefile +0 -77
- data/appveyor.yml +0 -47
- data/docs/CONTRIBUTING.md +0 -8
- data/docs/LICENSE +0 -22
- data/docs/README.md +0 -78
- data/docs/archetypes/default.md +0 -6
- data/docs/config.toml +0 -36
- data/docs/content/docs/_index.md +0 -5
- data/docs/content/docs/drivers/_index.md +0 -27
- data/docs/content/docs/drivers/azurerm.md +0 -44
- data/docs/content/docs/drivers/vagrant.md +0 -39
- data/docs/content/docs/getting-started/00-introduction.md +0 -14
- data/docs/content/docs/getting-started/01-installing.md +0 -64
- data/docs/content/docs/getting-started/02-getting-help.md +0 -59
- data/docs/content/docs/getting-started/03-creating-cookbook.md +0 -46
- data/docs/content/docs/getting-started/04-kitchen-yml.md +0 -56
- data/docs/content/docs/getting-started/05-instances.md +0 -79
- data/docs/content/docs/getting-started/06-writing-recipe.md +0 -21
- data/docs/content/docs/getting-started/07-running-converge.md +0 -134
- data/docs/content/docs/getting-started/08-manually-verifying.md +0 -55
- data/docs/content/docs/getting-started/09-writing-test.md +0 -49
- data/docs/content/docs/getting-started/10-running-verify.md +0 -120
- data/docs/content/docs/getting-started/11-running-test.md +0 -168
- data/docs/content/docs/getting-started/12-adding-platform.md +0 -206
- data/docs/content/docs/getting-started/13-adding-feature.md +0 -30
- data/docs/content/docs/getting-started/14-adding-suite.md +0 -60
- data/docs/content/docs/getting-started/15-adding-test.md +0 -66
- data/docs/content/docs/getting-started/16-adding-recipe.md +0 -53
- data/docs/content/docs/getting-started/17-excluding-platforms.md +0 -101
- data/docs/content/docs/getting-started/18-next-steps.md +0 -23
- data/docs/content/docs/getting-started/_index.md +0 -5
- data/docs/content/docs/provisioners/_index.md +0 -36
- data/docs/content/docs/provisioners/chef.md +0 -69
- data/docs/content/docs/provisioners/shell.md +0 -31
- data/docs/content/docs/reference/_index.md +0 -5
- data/docs/content/docs/reference/configuration.md +0 -53
- data/docs/content/docs/reference/examples.md +0 -97
- data/docs/content/docs/reference/faq.md +0 -58
- data/docs/content/docs/reference/fixtures.md +0 -32
- data/docs/content/docs/reference/glossary.md +0 -34
- data/docs/content/docs/reference/lifecycle-hooks.md +0 -68
- data/docs/content/docs/reference/reboots.md +0 -24
- data/docs/content/docs/verifiers/_index.md +0 -14
- data/docs/content/docs/verifiers/inspec.md +0 -44
- data/docs/content/docs/verifiers/serverspec.md +0 -20
- data/docs/static/images/chef-logo.png +0 -0
- data/docs/static/images/chef-logo.svg +0 -1
- data/docs/static/images/github-banner.png +0 -0
- data/docs/static/images/github-banner.svg +0 -71
- data/docs/static/images/kitchen-logo.png +0 -0
- data/docs/static/images/logo-block.svg +0 -222
- data/docs/static/images/logo.png +0 -0
- data/docs/static/images/logos-group.png +0 -0
- data/docs/static/images/terminal-1.png +0 -0
- data/docs/static/images/terminal-1.svg +0 -589
- data/docs/static/images/terminal-2.png +0 -0
- data/docs/static/images/terminal-2.svg +0 -235
- data/docs/static/images/terminal-3.png +0 -0
- data/docs/static/images/terminal-3.svg +0 -439
- data/docs/static/index.html +0 -59
- data/docs/static/javascripts/all.js +0 -348
- data/docs/static/javascripts/vendor/foundation.min.js +0 -4
- data/docs/static/javascripts/vendor/jquery.min.js +0 -5
- data/docs/static/javascripts/vendor/what-input.js +0 -336
- data/docs/static/stylesheets/site.css +0 -4667
- data/docs/themes/kitchen/layouts/_default/baseof.html +0 -53
- data/docs/themes/kitchen/layouts/_default/list.html +0 -4
- data/docs/themes/kitchen/layouts/_default/redirect.html +0 -10
- data/docs/themes/kitchen/layouts/_default/single.html +0 -6
- data/docs/themes/kitchen/layouts/partials/core/head.html +0 -6
- data/docs/themes/kitchen/layouts/partials/kitchen/footer.html +0 -18
- data/docs/themes/kitchen/layouts/partials/kitchen/head.html +0 -4
- data/docs/themes/kitchen/layouts/partials/kitchen/header.html +0 -26
- data/docs/themes/kitchen/layouts/partials/search-docs.html +0 -3
- data/docs/themes/kitchen/layouts/partials/sidebar.html +0 -33
- data/docs/themes/kitchen/layouts/shortcodes/button.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/codeblock.html +0 -8
- data/docs/themes/kitchen/layouts/shortcodes/cta.html +0 -5
- data/docs/themes/kitchen/layouts/shortcodes/danger.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/example_fqdn.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/info.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/ol-styled.html +0 -3
- data/docs/themes/kitchen/layouts/shortcodes/success.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/tip.html +0 -1
- data/docs/themes/kitchen/layouts/shortcodes/warning.html +0 -1
- data/docs/themes/kitchen/static/css/kitchen.css +0 -10
- data/docs/themes/kitchen/static/css/kitchen.css.map +0 -7
- data/docs/themes/kitchen/static/fonts/Muli-Bold.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/Muli-Regular.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/Muli-SemiBold.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.eot +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.svg +0 -1104
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff2 +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.eot +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.svg +0 -372
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff2 +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.eot +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.svg +0 -1896
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.ttf +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff +0 -0
- data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff2 +0 -0
- data/docs/themes/kitchen/static/images/chef-logo-light.svg +0 -36
- data/docs/themes/kitchen/static/images/chef-logo-white.svg +0 -38
- data/docs/themes/kitchen/static/images/chef-logo.svg +0 -37
- data/docs/themes/kitchen/static/images/favicon.ico +0 -0
- data/docs/themes/kitchen/static/js/scripts-all.js +0 -7
- data/docs/themes/kitchen/static/js/source/chef-hugo.js +0 -116
- data/docs/themes/kitchen/static/js/source/omnitruck.js +0 -82
- data/docs/themes/kitchen/static/js/source/segment.js +0 -52
- data/docs/themes/kitchen/static/sass/_buttons.scss +0 -161
- data/docs/themes/kitchen/static/sass/_core.scss +0 -24
- data/docs/themes/kitchen/static/sass/_forms.scss +0 -14
- data/docs/themes/kitchen/static/sass/_mixins.scss +0 -133
- data/docs/themes/kitchen/static/sass/_typography.scss +0 -34
- data/docs/themes/kitchen/static/sass/_variables.scss +0 -82
- data/docs/themes/kitchen/static/sass/kitchen.scss +0 -7
- data/docs/themes/kitchen/static/sass/kitchen/_footer.scss +0 -50
- data/docs/themes/kitchen/static/sass/kitchen/_header.scss +0 -187
- data/docs/themes/kitchen/static/sass/kitchen/_homepage.scss +0 -27
- data/docs/themes/kitchen/static/sass/kitchen/_utility-bar.scss +0 -173
- data/docs/themes/kitchen/static/sass/partials/_alerts.scss +0 -32
- data/docs/themes/kitchen/static/sass/partials/_bg.scss +0 -19
- data/docs/themes/kitchen/static/sass/partials/_blurbs.scss +0 -25
- data/docs/themes/kitchen/static/sass/partials/_callout.scss +0 -15
- data/docs/themes/kitchen/static/sass/partials/_cards.scss +0 -54
- data/docs/themes/kitchen/static/sass/partials/_dropdown.scss +0 -77
- data/docs/themes/kitchen/static/sass/partials/_grid.scss +0 -87
- data/docs/themes/kitchen/static/sass/partials/_padding.scss +0 -73
- data/docs/themes/kitchen/static/sass/partials/_sidebar.scss +0 -71
- data/docs/themes/kitchen/static/sass/partials/_tabs.scss +0 -125
- data/docs/themes/kitchen/static/sass/typography/_chroma.scss +0 -366
- data/docs/themes/kitchen/static/sass/typography/_code.scss +0 -72
- data/docs/themes/kitchen/static/sass/typography/_headers.scss +0 -90
- data/docs/themes/kitchen/static/sass/typography/_links.scss +0 -127
- data/docs/themes/kitchen/static/sass/typography/_lists.scss +0 -155
- data/docs/themes/kitchen/static/sass/typography/_prose.scss +0 -29
- data/docs/themes/kitchen/static/sass/typography/_text.scss +0 -221
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_animated.scss +0 -20
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_bordered-pulled.scss +0 -20
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_core.scss +0 -16
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_fixed-width.scss +0 -6
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_icons.scss +0 -992
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_larger.scss +0 -23
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_list.scss +0 -18
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_mixins.scss +0 -57
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_rotated-flipped.scss +0 -23
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_screen-reader.scss +0 -5
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_stacked.scss +0 -31
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/_variables.scss +0 -1005
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-brands.scss +0 -21
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-regular.scss +0 -22
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-solid.scss +0 -23
- data/docs/themes/kitchen/static/sass/vendor/fontawesome/fontawesome.scss +0 -16
- data/docs/themes/kitchen/theme.toml +0 -8
- data/features/kitchen_action_commands.feature +0 -164
- data/features/kitchen_command.feature +0 -16
- data/features/kitchen_console_command.feature +0 -35
- data/features/kitchen_defaults.feature +0 -38
- data/features/kitchen_diagnose_command.feature +0 -96
- data/features/kitchen_help_command.feature +0 -16
- data/features/kitchen_init_command.feature +0 -254
- data/features/kitchen_list_command.feature +0 -140
- data/features/kitchen_login_command.feature +0 -62
- data/features/kitchen_sink_command.feature +0 -30
- data/features/kitchen_test_command.feature +0 -88
- data/features/step_definitions/gem_steps.rb +0 -24
- data/features/step_definitions/git_steps.rb +0 -5
- data/features/step_definitions/output_steps.rb +0 -5
- data/features/support/env.rb +0 -74
- data/spec/kitchen/base64_stream_spec.rb +0 -74
- data/spec/kitchen/cli_spec.rb +0 -54
- data/spec/kitchen/collection_spec.rb +0 -76
- data/spec/kitchen/color_spec.rb +0 -51
- data/spec/kitchen/config_spec.rb +0 -434
- data/spec/kitchen/configurable_spec.rb +0 -1113
- data/spec/kitchen/data_munger_spec.rb +0 -2800
- data/spec/kitchen/diagnostic_spec.rb +0 -128
- data/spec/kitchen/driver/base_spec.rb +0 -132
- data/spec/kitchen/driver/dummy_spec.rb +0 -193
- data/spec/kitchen/driver/exec_spec.rb +0 -75
- data/spec/kitchen/driver/proxy_spec.rb +0 -127
- data/spec/kitchen/driver/ssh_base_spec.rb +0 -1136
- data/spec/kitchen/driver_spec.rb +0 -106
- data/spec/kitchen/errors_spec.rb +0 -317
- data/spec/kitchen/instance_spec.rb +0 -1372
- data/spec/kitchen/lazy_hash_spec.rb +0 -113
- data/spec/kitchen/lifecycle_hooks_spec.rb +0 -171
- data/spec/kitchen/loader/yaml_spec.rb +0 -787
- data/spec/kitchen/logger_spec.rb +0 -425
- data/spec/kitchen/logging_spec.rb +0 -56
- data/spec/kitchen/login_command_spec.rb +0 -67
- data/spec/kitchen/metadata_chopper_spec.rb +0 -79
- data/spec/kitchen/platform_spec.rb +0 -88
- data/spec/kitchen/provisioner/base_spec.rb +0 -393
- data/spec/kitchen/provisioner/chef/policyfile_spec.rb +0 -140
- data/spec/kitchen/provisioner/chef_apply_spec.rb +0 -131
- data/spec/kitchen/provisioner/chef_base_spec.rb +0 -1565
- data/spec/kitchen/provisioner/chef_solo_spec.rb +0 -602
- data/spec/kitchen/provisioner/chef_zero_spec.rb +0 -1013
- data/spec/kitchen/provisioner/dummy_spec.rb +0 -96
- data/spec/kitchen/provisioner/shell_spec.rb +0 -623
- data/spec/kitchen/provisioner_spec.rb +0 -101
- data/spec/kitchen/shell_out_spec.rb +0 -146
- data/spec/kitchen/ssh_spec.rb +0 -584
- data/spec/kitchen/state_file_spec.rb +0 -122
- data/spec/kitchen/suite_spec.rb +0 -61
- data/spec/kitchen/transport/base_spec.rb +0 -140
- data/spec/kitchen/transport/exec_spec.rb +0 -79
- data/spec/kitchen/transport/ssh_spec.rb +0 -1317
- data/spec/kitchen/transport/winrm_spec.rb +0 -1320
- data/spec/kitchen/transport_spec.rb +0 -106
- data/spec/kitchen/util_spec.rb +0 -250
- data/spec/kitchen/verifier/base_spec.rb +0 -346
- data/spec/kitchen/verifier/busser_spec.rb +0 -580
- data/spec/kitchen/verifier/dummy_spec.rb +0 -96
- data/spec/kitchen/verifier/shell_spec.rb +0 -157
- data/spec/kitchen/verifier_spec.rb +0 -114
- data/spec/kitchen_spec.rb +0 -112
- data/spec/spec_helper.rb +0 -110
- data/spec/support/powershell_max_size_spec.rb +0 -39
- data/test-kitchen.gemspec +0 -49
- data/test/cookbooks/test_cookbook/metadata.rb +0 -6
- data/test/cookbooks/test_cookbook/recipes/default.rb +0 -1
- data/test/integration/default/default_spec.rb +0 -3
- data/testing_windows.md +0 -38
data/spec/spec_helper.rb
DELETED
@@ -1,110 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
|
-
#
|
5
|
-
# Copyright (C) 2012, Fletcher Nichol
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
|
19
|
-
gem "minitest"
|
20
|
-
|
21
|
-
begin
|
22
|
-
require "simplecov"
|
23
|
-
SimpleCov.profiles.define "gem" do
|
24
|
-
command_name "Specs"
|
25
|
-
|
26
|
-
add_filter ".gem/"
|
27
|
-
add_filter "/spec/"
|
28
|
-
add_filter "/lib/vendor/"
|
29
|
-
|
30
|
-
add_group "Libraries", "/lib/"
|
31
|
-
end
|
32
|
-
SimpleCov.start "gem"
|
33
|
-
rescue LoadError
|
34
|
-
puts "add simplecov to Gemfile.local or GEMFILE_MOD to generate code coverage"
|
35
|
-
end
|
36
|
-
|
37
|
-
require "fakefs/safe"
|
38
|
-
require "minitest/autorun"
|
39
|
-
require "mocha/setup"
|
40
|
-
require "tempfile"
|
41
|
-
|
42
|
-
# Nasty hack to redefine IO.read in terms of File#read for fakefs
|
43
|
-
class IO
|
44
|
-
def self.read(*args)
|
45
|
-
length = args[1]
|
46
|
-
offset = args[2]
|
47
|
-
opt = args[3]
|
48
|
-
if length.is_a? Hash
|
49
|
-
opt = length
|
50
|
-
length = nil
|
51
|
-
elsif offset.is_a? Hash
|
52
|
-
opt = offset
|
53
|
-
end
|
54
|
-
if opt && opt.key?(:mode)
|
55
|
-
File.open(args[0], opt) { |f| f.read(length) }
|
56
|
-
else
|
57
|
-
File.open(args[0], "rb", opt) { |f| f.read(length) }
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# Hack to sort results in `Dir.entries` only within the yielded block, to limit
|
63
|
-
# the "behavior pollution" to other code. This was needed for Net::SCP, as
|
64
|
-
# recursive directory upload doesn't sort the file and directory upload
|
65
|
-
# candidates which leads to different results based on the underlying
|
66
|
-
# filesystem (i.e. lexically sorted, inode insertion, mtime/atime, total
|
67
|
-
# randomness, etc.)
|
68
|
-
#
|
69
|
-
# See: https://github.com/net-ssh/net-scp/blob/a24948/lib/net/scp/upload.rb#L52
|
70
|
-
|
71
|
-
$_sort_dir_entries = false
|
72
|
-
Dir.singleton_class.prepend(Module.new do
|
73
|
-
def entries(*args)
|
74
|
-
super.tap do |rv|
|
75
|
-
rv.sort! if $_sort_dir_entries
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end)
|
79
|
-
|
80
|
-
def with_sorted_dir_entries(&block)
|
81
|
-
old_sort_dir_entries = $_sort_dir_entries
|
82
|
-
$_sort_dir_entries = true
|
83
|
-
yield
|
84
|
-
ensure
|
85
|
-
$_sort_dir_entries = old_sort_dir_entries
|
86
|
-
end
|
87
|
-
|
88
|
-
def with_fake_fs
|
89
|
-
FakeFS.activate!
|
90
|
-
FileUtils.mkdir_p("/tmp")
|
91
|
-
yield
|
92
|
-
FakeFS.deactivate!
|
93
|
-
FakeFS::FileSystem.clear
|
94
|
-
end
|
95
|
-
|
96
|
-
def running_tests_on_windows?
|
97
|
-
ENV["OS"] == "Windows_NT"
|
98
|
-
end
|
99
|
-
|
100
|
-
def os_safe_root_path(root_path)
|
101
|
-
if running_tests_on_windows?
|
102
|
-
File.join(ENV["SystemDrive"], root_path).to_s
|
103
|
-
else
|
104
|
-
root_path
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
def padded_octal_string(integer)
|
109
|
-
integer.to_s(8).rjust(4, "0")
|
110
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
|
-
#
|
5
|
-
# Copyright (C) 2014, Fletcher Nichol
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
|
19
|
-
require_relative "../spec_helper"
|
20
|
-
|
21
|
-
# There is some double Base64 encoding going on when a PowerShell script is
|
22
|
-
# given to a CMD to invoke. We're in a battle with Windows' CMD max length and
|
23
|
-
# that what these specs are trying to ensure. This does lead to some less than
|
24
|
-
# ideal "code golfing" to reduce the code payload, but at the end of the day
|
25
|
-
# it's easier to see the entire context of the code vs. uploading partial code
|
26
|
-
# fragements and calling them on the remote side (not to mention more expensive
|
27
|
-
# in terms of PowerShell invocations).
|
28
|
-
|
29
|
-
describe "PowerShell script max size" do
|
30
|
-
MAX_POWERSHELL_SIZE = 3010
|
31
|
-
|
32
|
-
Dir.glob(File.join(File.dirname(__FILE__), "../../support/*.ps1*")).each do |script|
|
33
|
-
base = File.basename(script)
|
34
|
-
|
35
|
-
it "support/#{base} size must be less than #{MAX_POWERSHELL_SIZE} bytes" do
|
36
|
-
(IO.read(script).size < MAX_POWERSHELL_SIZE).must_equal true
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/test-kitchen.gemspec
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "kitchen/version"
|
5
|
-
require "English"
|
6
|
-
|
7
|
-
Gem::Specification.new do |gem|
|
8
|
-
gem.name = "test-kitchen"
|
9
|
-
gem.version = Kitchen::VERSION
|
10
|
-
gem.license = "Apache 2.0"
|
11
|
-
gem.authors = ["Fletcher Nichol"]
|
12
|
-
gem.email = ["fnichol@nichol.ca"]
|
13
|
-
gem.description = "Test Kitchen is an integration tool for developing " \
|
14
|
-
"and testing infrastructure code and software on " \
|
15
|
-
"isolated target platforms."
|
16
|
-
gem.summary = gem.description
|
17
|
-
gem.homepage = "http://kitchen.ci"
|
18
|
-
|
19
|
-
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
20
|
-
gem.executables = %w{kitchen}
|
21
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
22
|
-
gem.require_paths = ["lib"]
|
23
|
-
|
24
|
-
gem.required_ruby_version = ">= 2.3"
|
25
|
-
|
26
|
-
gem.add_dependency "mixlib-shellout", ">= 1.2", "< 3.0"
|
27
|
-
gem.add_dependency "net-scp", "~> 1.1"
|
28
|
-
gem.add_dependency "net-ssh", ">= 2.9", "< 5.0"
|
29
|
-
gem.add_dependency "net-ssh-gateway", "~> 1.2"
|
30
|
-
gem.add_dependency "thor", "~> 0.19"
|
31
|
-
gem.add_dependency "mixlib-install", "~> 3.6"
|
32
|
-
gem.add_dependency "winrm", "~> 2.0"
|
33
|
-
gem.add_dependency "winrm-elevated", "~> 1.0"
|
34
|
-
gem.add_dependency "winrm-fs", "~> 1.1"
|
35
|
-
|
36
|
-
gem.add_development_dependency "rb-readline"
|
37
|
-
gem.add_development_dependency "overcommit", "= 0.33.0"
|
38
|
-
|
39
|
-
gem.add_development_dependency "bundler"
|
40
|
-
gem.add_development_dependency "rake"
|
41
|
-
|
42
|
-
gem.add_development_dependency "aruba", "~> 0.11"
|
43
|
-
gem.add_development_dependency "fakefs", "~> 0.4"
|
44
|
-
gem.add_development_dependency "minitest", "~> 5.3", "< 5.11"
|
45
|
-
gem.add_development_dependency "mocha", "~> 1.1"
|
46
|
-
gem.add_development_dependency "cucumber", "~> 2.1"
|
47
|
-
gem.add_development_dependency "countloc", "~> 0.4"
|
48
|
-
gem.add_development_dependency "maruku", "~> 0.6"
|
49
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
directory "/tk_test_directory"
|
data/testing_windows.md
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
## Testing test-kitchen contributions against windows test instances
|
2
|
-
|
3
|
-
### Choose a windows based cookbook
|
4
|
-
The [windows cookbook](https://github.com/chef-cookbooks/windows) is a grand choice.
|
5
|
-
|
6
|
-
### Edit the `Gemfile`
|
7
|
-
Ensure that the cookbook's root directory includes a `Gemfile` that includes your local test-kitchen repo on the branch you would like to test as well as required windows-only needed gems:
|
8
|
-
```
|
9
|
-
gem 'test-kitchen', git: 'https://github.com/mwrock/test-kitchen', branch: 'winrm-fs'
|
10
|
-
gem 'winrm', '~> 1.6'
|
11
|
-
gem 'winrm-fs', '~> 0.4.1'
|
12
|
-
gem 'winrm-elevated', '~> 0.4.0'
|
13
|
-
```
|
14
|
-
The above would target the `winrm-fs` branch in mwrock's test-kitchen repo.
|
15
|
-
|
16
|
-
### Finding a windows image
|
17
|
-
Make sure you have a windows test image handy. You can use your favorite cloud or hypervisor. An easy vagrant option is `mwrock/Windows2012R2` which is publicly available on atlas. To use that, edit your cookbook's `.kitchen.yml` to include:
|
18
|
-
```
|
19
|
-
platforms:
|
20
|
-
- name: win2012r2-standard
|
21
|
-
driver:
|
22
|
-
box: mwrock/Windows2012R2
|
23
|
-
```
|
24
|
-
|
25
|
-
For other windows OS versions, you can spin up instances in your favorite cloud provider or create your own vagrant box. The windows packer templates found in the [boxcutter repo](https://github.com/boxcutter/windows) provide a good place to start here.
|
26
|
-
|
27
|
-
### `bundle install`
|
28
|
-
|
29
|
-
From the root of your cookbook directory run `bundle install`
|
30
|
-
|
31
|
-
### Converge and test!
|
32
|
-
|
33
|
-
Now run `bundle exec kitchen verify`.
|
34
|
-
|
35
|
-
If your cookbook has multiple suites (like the windows cookbook), you likely just want to run one:
|
36
|
-
```
|
37
|
-
bundle exec kitchen verify feature
|
38
|
-
```
|