Fix for test failure

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
Vasu1105 2022-05-05 12:33:36 +05:30
parent 913e6215d4
commit 56b8306e34

View file

@ -13,8 +13,8 @@ class SignCli < Minitest::Test
out = run_inspec_process("sign generate-keys --keyname #{unique_key_name}", prefix: "cd #{dir};")
stdout = out.stdout.force_encoding(Encoding::UTF_8)
assert_includes stdout, "Generating private key"
assert_includes stdout, "Generating public key"
assert_includes stdout, "Generating signing key in"
assert_includes stdout, "Generating validation key"
assert_exit_code 0, out
end
@ -25,8 +25,6 @@ class SignCli < Minitest::Test
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)
# create profile
profile = File.join(dir, "artifact-profile")
@ -38,11 +36,6 @@ class SignCli < Minitest::Test
out = run_inspec_process("sign profile --profile #{profile} --keyname #{unique_key_name}", prefix: "cd #{dir};")
assert_exit_code 0, out
# The archive install commands do not currently support windows
# and use specific linux extract tar commands. Since artifact is
# still experimental we are skipping it for now.
return if is_windows?
out = run_inspec_process("sign verify --signed-profile artifact-profile-0.1.0.iaf", prefix: "cd #{dir};")
assert_exit_code 0, out