Merge pull request #5213 from inspec/ns/windows

skip_windows! documentation and clearing
This commit is contained in:
Nick Schwaderer 2020-09-14 16:53:15 +01:00 committed by GitHub
commit 668197f726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 47 additions and 75 deletions

View file

@ -7,6 +7,8 @@ class ArtifactCli < Minitest::Test
def test_generating_archive_keys
prepare_examples do |dir|
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
unique_key_name = SecureRandom.uuid
out = run_inspec_process("artifact generate --keyname #{unique_key_name}", prefix: "cd #{dir};")
@ -20,6 +22,8 @@ class ArtifactCli < Minitest::Test
def test_verify_and_install_signed_profile
prepare_examples do |dir|
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
unique_key_name = SecureRandom.uuid
install_dir = File.join(dir, SecureRandom.uuid)
FileUtils.mkdir(install_dir)

View file

@ -8,7 +8,6 @@ class InitPluginCli < Minitest::Test
plugin = "wacky-name"
run_result = run_inspec_process("init plugin --no-prompt #{plugin} ", prefix: "cd #{dir} &&")
skip_windows!
assert_includes run_result.stdout, "ERROR"
assert_includes run_result.stdout, "Plugin names must begin with"
@ -26,7 +25,6 @@ class InitPluginCli < Minitest::Test
run_result = run_inspec_process("init plugin --no-prompt #{plugin}", prefix: "cd #{dir} &&")
skip_windows!
assert_includes run_result.stdout, "Creating new inspec plugin at"
assert_includes run_result.stdout, plugin
@ -132,7 +130,6 @@ class InitPluginCli < Minitest::Test
run_result = run_inspec_process("init plugin #{plugin} --no-prompt #{opts}", prefix: "cd #{dir} &&")
skip_windows!
assert_includes run_result.stdout, "Creating new inspec plugin at"
assert_includes run_result.stdout, plugin

View file

@ -9,7 +9,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-profile")
out = run_inspec_process("init profile test-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"
@ -24,7 +23,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-profile")
out = run_inspec_process("init profile --platform os test-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"
@ -38,7 +36,6 @@ class InitCli < Minitest::Test
Dir.mktmpdir do |dir|
out = run_inspec_process("init profile --platform nonesuch test-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Unable to generate profile"
assert_includes out.stdout, "No template available for platform 'nonesuch'"
@ -50,7 +47,6 @@ class InitCli < Minitest::Test
Dir.mktmpdir do |dir|
profile = dir + "/test/deeper/profile"
out = run_inspec_process("init profile test/deeper/profile", prefix: "cd #{dir} &&")
skip_windows!
assert_equal true, File.exist?(profile)
profile = YAML.load_file("#{profile}/inspec.yml")
assert_equal "profile", profile["name"]
@ -64,7 +60,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-gcp-profile")
out = run_inspec_process("init profile --platform gcp test-gcp-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"
@ -79,7 +74,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-aws-profile")
out = run_inspec_process("init profile --platform aws test-aws-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"
@ -94,7 +88,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-azure-profile")
out = run_inspec_process("init profile --platform azure test-azure-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"
@ -109,7 +102,6 @@ class InitCli < Minitest::Test
profile = File.join(dir, "test-os-profile")
out = run_inspec_process("init profile --platform os test-os-profile", prefix: "cd #{dir} &&")
skip_windows!
assert_includes out.stdout, "Creating new profile at"
assert_includes out.stdout, profile
assert_includes Dir.entries(profile).join, "inspec.yml"

View file

@ -6,14 +6,12 @@ class PluginManagerCliHelp < Minitest::Test
# Main inspec help subcommand listing
def test_inspec_help_includes_plugin
result = run_inspec_process_with_this_plugin("help")
skip_windows!
assert_includes result.stdout, "inspec plugin"
end
# inspec plugin help subcommand listing
def test_inspec_plugin_help_includes_plugin
result = run_inspec_process_with_this_plugin("plugin help")
skip_windows!
assert_includes result.stdout, "inspec plugin list"
assert_includes result.stdout, "inspec plugin search"
assert_includes result.stdout, "inspec plugin install"

View file

@ -47,7 +47,6 @@ class PluginManagerCliInstall < Minitest::Test
# Check UX messaging
success_message = install_result.stdout.split("\n").grep(/installed/).last
skip_windows!
assert_empty install_result.stderr
refute_nil success_message, "Should find a success message at the end"
assert_includes success_message, fixture_info[:plugin_name]
@ -70,7 +69,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_fail_install_from_nonexistant_path
bad_path = File.join(project_fixtures_path, "none", "such", "inspec-test-fixture-nonesuch.rb")
install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")
skip_windows!
error_message = install_result.stdout
assert_includes error_message, "No such source code path"
@ -85,7 +83,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_fail_install_from_path_with_wrong_name
bad_path = File.join(project_fixtures_path, "plugins", "wrong-name", "lib", "wrong-name.rb")
install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")
skip_windows!
error_message = install_result.stdout
assert_includes error_message, "Invalid plugin name"
@ -101,7 +98,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_fail_install_from_path_when_it_is_not_a_plugin
bad_path = File.join(project_fixtures_path, "plugins", "inspec-egg-white-omelette", "lib", "inspec-egg-white-omelette.rb")
install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")
skip_windows!
error_message = install_result.stdout
assert_includes error_message, "Does not appear to be a plugin"
@ -126,7 +122,6 @@ class PluginManagerCliInstall < Minitest::Test
end
install_result = run_inspec_process_with_this_plugin("plugin install #{plugin_path}", pre_run: pre_block)
skip_windows!
error_message = install_result.stdout
assert_includes error_message, "Plugin already installed"
@ -142,7 +137,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_fail_install_from_path_when_the_dir_structure_is_wrong
bad_path = File.join(project_fixtures_path, "plugins", "inspec-wrong-structure")
install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")
skip_windows!
error_message = install_result.stdout
assert_includes error_message, "Unrecognizable plugin structure"
@ -158,7 +152,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_install_from_gemfile
fixture_gemfile_path = File.join(core_fixture_plugins_path, "inspec-test-fixture", "pkg", "inspec-test-fixture-0.1.0.gem")
install_result = run_inspec_process_with_this_plugin("plugin install #{fixture_gemfile_path}", post_run: list_after_run)
skip_windows!
success_message = install_result.stdout.split("\n").grep(/installed/).last
refute_nil success_message, "Should find a success message at the end"
@ -177,7 +170,6 @@ class PluginManagerCliInstall < Minitest::Test
bad_path = File.join(project_fixtures_path, "none", "such", "inspec-test-fixture-nonesuch-0.3.0.gem")
install_result = run_inspec_process_with_this_plugin("plugin install #{bad_path}")
skip_windows!
assert_match(/No such plugin gem file .+ - installation failed./, install_result.stdout)
assert_empty install_result.stderr
@ -187,7 +179,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_install_from_rubygems_latest
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture", post_run: list_after_run)
skip_windows!
success_message = install_result.stdout.split("\n").grep(/installed/).last
refute_nil success_message, "Should find a success message at the end"
@ -207,7 +198,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_fail_install_from_nonexistant_remote_rubygem
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture-nonesuch")
skip_windows!
assert_match(/No such plugin gem .+ could be found on rubygems.org - installation failed./, install_result.stdout)
assert_empty install_result.stderr
@ -219,7 +209,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture -v 0.1.0", post_run: list_after_run)
success_message = install_result.stdout.split("\n").grep(/installed/).last
skip_windows!
refute_nil success_message, "Should find a success message at the end"
assert_includes success_message, "inspec-test-fixture"
assert_includes success_message, "0.1.0"
@ -239,7 +228,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture -v 99.99.99")
fail_message = install_result.stdout.split("\n").grep(/failed/).last
skip_windows!
refute_nil fail_message, "Should find a failure message at the end"
assert_includes fail_message, "inspec-test-fixture"
assert_includes fail_message, "99.99.99"
@ -255,7 +243,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install test-fixture")
fail_message = install_result.stdout.split("\n").grep(/failed/).last
skip_windows!
refute_nil fail_message, "Should find a failure message at the end"
assert_includes fail_message, "test-fixture"
assert_includes fail_message, "All inspec plugins must begin with either 'inspec-' or 'train-'"
@ -274,7 +261,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture", pre_run: pre_block)
refusal_message = install_result.stdout.split("\n").grep(/refusing/).last
skip_windows!
refute_nil refusal_message, "Should find a failure message at the end"
assert_includes refusal_message, "inspec-test-fixture"
assert_includes refusal_message, "0.2.0"
@ -294,7 +280,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture", pre_run: pre_block)
refusal_message = install_result.stdout.split("\n").grep(/refusing/).last
skip_windows!
refute_nil refusal_message, "Should find a failure message at the end"
assert_includes refusal_message, "inspec-test-fixture"
assert_includes refusal_message, "0.1.0"
@ -309,7 +294,6 @@ class PluginManagerCliInstall < Minitest::Test
def test_install_from_rubygems_latest_with_train_plugin
install_result = run_inspec_process_with_this_plugin("plugin install train-test-fixture", post_run: list_after_run)
skip_windows!
success_message = install_result.stdout.split("\n").grep(/installed/).last
refute_nil success_message, "Should find a success message at the end"
@ -339,7 +323,6 @@ class PluginManagerCliInstall < Minitest::Test
install_result = run_inspec_process_with_this_plugin("plugin install #{plugin_name}")
refusal_message = install_result.stdout
refute_nil refusal_message, "Should find a failure message at the end"
skip_windows!
assert_includes refusal_message, plugin_name
assert_includes refusal_message, "Plugin on Exclusion List"
assert_includes refusal_message, "refusing to install"
@ -357,7 +340,6 @@ class PluginManagerCliInstall < Minitest::Test
skip "this test requires bundler to pass" unless defined? ::Bundler
install_result = run_inspec_process_with_this_plugin("plugin install inspec-test-fixture -v 0.1.1 --log-level debug")
skip_windows!
assert_includes install_result.stdout, "DEBUG"

View file

@ -13,7 +13,6 @@ class PluginManagerCliList < Minitest::Test
def test_list_all_when_no_user_plugins_installed
result = run_inspec_process_with_this_plugin("plugin list --all")
skip_windows!
assert_empty result.stderr
plugins_seen = parse_plugin_list_lines(result.stdout)
@ -30,7 +29,6 @@ class PluginManagerCliList < Minitest::Test
def test_list_selective_when_no_user_plugins_installed
LIST_CASES.each do |test_case|
result = run_inspec_process_with_this_plugin("plugin list #{test_case[:arg]}")
skip_windows!
assert_empty result.stderr
plugins_seen = parse_plugin_list_lines(result.stdout)
@ -48,7 +46,6 @@ class PluginManagerCliList < Minitest::Test
end
result = run_inspec_process_with_this_plugin("plugin list --user ", pre_run: pre_block)
skip_windows!
assert_empty result.stderr
plugins_seen = parse_plugin_list_lines(result.stdout)
@ -78,7 +75,6 @@ class PluginManagerCliList < Minitest::Test
end
result = run_inspec_process_with_this_plugin("plugin list --user ", pre_run: pre_block)
skip_windows!
assert_empty result.stderr
plugins_seen = parse_plugin_list_lines(result.stdout)

View file

@ -14,7 +14,6 @@ class PluginManagerCliUninstall < Minitest::Test
uninstall_result = run_inspec_process_with_this_plugin("plugin uninstall inspec-test-fixture", pre_run: pre_block, post_run: list_after_run)
success_message = uninstall_result.stdout.split("\n").grep(/uninstalled/).last
skip_windows!
refute_nil success_message, "Should find a success message at the end"
assert_includes success_message, "inspec-test-fixture"
assert_includes success_message, "0.1.0"
@ -34,7 +33,6 @@ class PluginManagerCliUninstall < Minitest::Test
copy_in_core_config_dir("test-fixture-1-float", tmp_dir)
end
uninstall_result = run_inspec_process_with_this_plugin("plugin uninstall inspec-meaning-of-life", pre_run: pre_block, post_run: list_after_run)
skip_windows!
success_message = uninstall_result.stdout.split("\n").grep(/uninstalled/).last
refute_nil success_message, "Should find a success message at the end"
@ -52,7 +50,6 @@ class PluginManagerCliUninstall < Minitest::Test
def test_fail_uninstall_from_plugin_that_is_not_installed
uninstall_result = run_inspec_process_with_this_plugin("plugin uninstall inspec-test-fixture-nonesuch")
skip_windows!
refute_includes "Inspec::Plugin::V2::UnInstallError", uninstall_result.stdout # Stacktrace marker
assert_match(/No such plugin installed:.+ - uninstall failed/, uninstall_result.stdout)

View file

@ -15,7 +15,6 @@ class PluginManagerCliUpdate < Minitest::Test
update_result = run_inspec_process_with_this_plugin("plugin update inspec-test-fixture", pre_run: pre_block, post_run: list_after_run)
success_message = update_result.stdout.split("\n").grep(/updated/).last
skip_windows!
refute_nil success_message, "Should find a success message at the end"
assert_includes success_message, "inspec-test-fixture"
assert_includes success_message, "0.1.0"
@ -40,7 +39,6 @@ class PluginManagerCliUpdate < Minitest::Test
update_result = run_inspec_process_with_this_plugin("plugin update inspec-test-fixture", pre_run: pre_block)
refusal_message = update_result.stdout.split("\n").grep(/refusing/).last
skip_windows!
refute_nil refusal_message, "Should find a failure message at the end"
assert_includes refusal_message, "inspec-test-fixture"
assert_includes refusal_message, "0.2.0"
@ -54,7 +52,6 @@ class PluginManagerCliUpdate < Minitest::Test
def test_fail_update_from_nonexistant_gem
update_result = run_inspec_process_with_this_plugin("plugin update inspec-test-fixture-nonesuch")
skip_windows!
assert_match(/No such plugin installed:.+ - update failed/, update_result.stdout)
assert_empty update_result.stderr
@ -71,7 +68,6 @@ class PluginManagerCliUpdate < Minitest::Test
update_result = run_inspec_process_with_this_plugin("plugin update inspec-meaning-of-life", pre_run: pre_block)
refusal_message = update_result.stdout.split("\n").grep(/refusing/).last
skip_windows!
refute_nil refusal_message, "Should find a failure message at the end"
assert_includes refusal_message, "inspec-meaning-of-life"
assert_includes refusal_message, "inspec plugin uninstall"

View file

@ -50,22 +50,6 @@ module CorePluginFunctionalHelper
include CorePluginBaseHelper
include FunctionalHelper
# TODO: so much duplication! Remove everything we can!
require "train"
TRAIN_CONNECTION = Train.create("local", command_runner: :generic).connection
# TODO: remove me! it's in test/functional/helper.rb
def run_inspec_process(command_line, opts = {})
prefix = ""
if opts.key?(:prefix)
prefix = opts[:prefix]
elsif opts.key?(:env)
prefix = assemble_env_prefix opts[:env]
end
TRAIN_CONNECTION.run_command("#{prefix} #{exec_inspec} #{command_line}")
end
# This helper does some fancy footwork to make InSpec think a plugin
# under development is temporarily installed.
# @param String command_line Invocation, without the word 'inspec'

View file

@ -13,6 +13,21 @@ describe "running profiles with git-based dependencies" do
before(:all) do
skip_windows! # Right now, this is due to symlinking, break executes on L24 <nickchecked>
# Stacktrace on windows machine:
# Error:
# running profiles with git-based dependencies::running a profile with an ./ relative path dependency#test_0001_should find the top-level profile in the git-referenced child profile and execute that:
# Errno::ENOENT: No such file or directory @ apply2files - C:/Users/some/path/inspec/inspec/test/fixtures/profiles/git-fetcher/basic-local/.git
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:1437:in `unlink'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:1437:in `block in remove_file'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:1445:in `platform_support'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:1436:in `remove_file'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:775:in `remove_file'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:562:in `block in rm'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:561:in `each'
# C:/Ruby/lib/ruby/2.6.0/fileutils.rb:561:in `rm'
# C:/Users/some/path/inspec/inspec/test/functional/git_fetcher_test.rb:31:in `block (3 levels) in <top (required)>'
# C:/Users/some/path/inspec/inspec/test/functional/git_fetcher_test.rb:29:in `each'
# C:/Users/some/path/inspec/inspec/test/functional/git_fetcher_test.rb:29:in `block (2 levels) in <top (required)>'"
# We need a git repo for some of the profile test fixtures,
# but we can't store those directly in git.

View file

@ -72,7 +72,7 @@ describe "example inheritance profile" do
it "can execute a profile inheritance" do
# TODO: the inheritence profile uses here fails on windows.
skip_windows!
skip_windows! # Breakage confirmed
out = inspec("exec " + path + " --reporter json --no-create-lockfile --input-file " + input_file)
_(out.stderr).must_equal ""

View file

@ -41,7 +41,6 @@ describe "inspec exec with json formatter" do
_(out.stderr).must_equal ""
skip_windows!
assert_exit_code 0, out
end

View file

@ -15,7 +15,6 @@ describe "inspec exec with junit formatter" do
_(out.stderr).must_equal ""
skip_windows!
assert_exit_code 0, out
end
@ -51,7 +50,6 @@ describe "inspec exec with junit formatter" do
end
it "has the failures attribute with 0 total tests" do
skip_windows!
_(suite.attribute("failed").value).must_equal "0"
end

View file

@ -456,8 +456,8 @@ Test Summary: 2 successful, 0 failures, 0 skipped\n"
describe "when using profiles on the supermarket" do
it "can run supermarket profiles directly from the command line" do
skip_windows! # can't modify /tmp -> / because it is in supermarket
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
inspec("exec supermarket://nathenharvey/tmp-compliance-profile --no-create-lockfile")
if is_windows?
@ -476,7 +476,7 @@ Test Summary: 2 successful, 0 failures, 0 skipped\n"
end
it "can run supermarket profiles from inspec.yml" do
skip_windows! # can't modify /tmp -> / because it is in supermarket
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
inspec("exec #{File.join(profile_path, "supermarket-dep")} --no-create-lockfile")

View file

@ -9,6 +9,9 @@ describe "inspec shell tests" do
def assert_shell_c(code, exit_status, json = false, stderr = "")
json_suffix = " --reporter 'json'" if json
command = "shell -c '#{code.tr("'", '\\\'')}'#{json_suffix}"
# On darwin this value is:
# shell -c 'describe file(\"/Users/nickschwaderer/Documents/inspec/inspec/test/functional/inspec_shell_test.rb\") do it { should exist } end' --reporter 'json'"
# appears to break in windows.
out = inspec(command)
actual = out.stderr.gsub(/\e\[(\d+)(;\d+)*m/, "") # strip ANSI color codes
@ -95,6 +98,25 @@ describe "inspec shell tests" do
it "runs anonymous tests that succeed (json output)" do
skip_windows! # Breakage confirmed
# All skip_windows breakages have this output:
# Expected: ""
# C:/Users/some/path/inspec/inspec/lib/inspec/profile_context.rb:168:in `instance_eval': (eval):1: syntax error, unexpected tIDENTIFIER, expecting ')' (SyntaxError)
# describe file(" "foo/bar/baz) do it { should exis...
# ^~~
# (eval):1: syntax error, unexpected ')', expecting end-of-input
# describe file(" "foo/bar/baz) do it { should exist } end
# ^
# from C:/Users/some/path/inspec/inspec/lib/inspec/profile_context.rb:168:in `load_with_context'
# from C:/Users/some/path/inspec/inspec/lib/inspec/profile_context.rb:154:in `load_control_file'
# from C:/Users/some/path/inspec/inspec/lib/inspec/runner.rb:250:in `eval_with_virtual_profile'
# from C:/Users/some/path/inspec/inspec/lib/inspec/cli.rb:400:in `run_command'
# from C:/Users/some/path/inspec/inspec/lib/inspec/cli.rb:339:in `shell_func'
# from C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
# from C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
# from C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
# from C:/Ruby/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
# from C:/Users/some/path/inspec/inspec/lib/inspec/base_cli.rb:35:in `start'
# from C:/Users/some/path/inspec/inspec/inspec-bin/bin/inspec:11:in `<main>'
out = assert_shell_c("describe file(\"#{__FILE__}\") do it { should exist } end", 0, true)
j = JSON.load(out.stdout)
_(j.keys).must_include "version"

View file

@ -35,7 +35,8 @@ describe "inspec supermarket" do
_(out.stderr).must_equal ""
skip_windows!
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
assert_exit_code 100, out
end
end

View file

@ -116,7 +116,7 @@ describe "example inheritance profile" do
_(out.stderr).must_equal ""
skip_windows! # Breakage confirmed - Only hits in parallel CI
skip_windows! # Breakage confirmed, only on CI: https://buildkite.com/chef-oss/inspec-inspec-master-verify/builds/2355#2c9d032e-4a24-4e7c-aef2-1c9e2317d9e2
assert_exit_code 100, out
end
end

View file

@ -127,8 +127,6 @@ describe "The license acceptance mechanism" do
EOY
_(File.exist?(license_persist_path)).must_equal true # Sanity check
skip_windows! # exit code 1
run_result = run_inspec_process("shell -c platform.family", env: { "HOME" => tmp_home })
_(run_result.stdout).wont_include "Chef License Acceptance"

View file

@ -155,7 +155,6 @@ class PluginInstallerInstallationTests < Minitest::Test
def test_install_a_gem_from_local_file_creates_plugin_json
gem_file = File.join(@plugin_fixture_pkg_path, "inspec-test-fixture-0.1.0.gem")
stdout, _stderr = capture_io do
skip_windows!
@installer.install("inspec-test-fixture", gem_file: gem_file)
end
@ -177,7 +176,6 @@ class PluginInstallerInstallationTests < Minitest::Test
def test_install_a_gem_from_rubygems_org
skip_slow_tests
skip_windows!
capture_subprocess_io do
@installer.install("inspec-test-fixture")
end
@ -209,7 +207,6 @@ class PluginInstallerInstallationTests < Minitest::Test
# Should be able to install a plugin while pinning the version
def test_install_a_pinned_gem_from_rubygems_org
skip_windows!
skip_slow_tests
capture_subprocess_io do
@ -322,7 +319,6 @@ class PluginInstallerUpdaterTests < Minitest::Test
copy_in_config_dir("test-fixture-1-float")
@installer.__reset_loader
skip_windows!
capture_subprocess_io do
@installer.update("inspec-test-fixture")
@ -348,7 +344,6 @@ class PluginInstallerUpdaterTests < Minitest::Test
@installer.__reset_loader
# Update to specific (but later) version
skip_windows!
capture_subprocess_io do
@installer.update("inspec-test-fixture", version: "0.2.0")
@ -416,7 +411,6 @@ class PluginInstallerUninstallTests < Minitest::Test
copy_in_config_dir("test-fixture-1-float")
@installer.__reset_loader
skip_windows!
capture_subprocess_io do
@installer.uninstall("inspec-test-fixture")
end
@ -444,7 +438,6 @@ class PluginInstallerUninstallTests < Minitest::Test
copy_in_config_dir("test-fixture-2-float")
@installer.__reset_loader
skip_windows!
capture_subprocess_io do
@installer.uninstall("inspec-test-fixture")
end