mirror of
https://github.com/inspec/inspec
synced 2024-11-22 04:33:09 +00:00
Skip audit log test on Windows (#6950)
* Skip audit log test on Windows Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com> * Fix the text in the audit log test Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com> --------- Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
This commit is contained in:
parent
329eafa8f9
commit
dc7631b8ac
1 changed files with 6 additions and 3 deletions
|
@ -14,7 +14,8 @@ describe "inspec audit log feature" do
|
|||
end
|
||||
|
||||
describe "When audit logging off" do
|
||||
it "should not create create audit log file in the default location when inpsec exec run" do
|
||||
it "should not create create audit log file in the default location when inspec exec is run" do
|
||||
skip_windows!
|
||||
cli_args = "--audit-log-location #{Inspec.log_dir}/inspec-test-audit.log"
|
||||
run_result = run_inspec_process("exec " + File.join(profile_path, "basic_profile") + " " + cli_args)
|
||||
_(run_result.exit_status).must_equal 0
|
||||
|
@ -23,7 +24,8 @@ describe "inspec audit log feature" do
|
|||
end
|
||||
|
||||
describe "When audit logging on" do
|
||||
it "should create audit log file in the default location when inpsec exec run" do
|
||||
it "should create audit log file in the default location when inspec exec is run" do
|
||||
skip_windows!
|
||||
cli_args = "--audit-log-location #{Inspec.log_dir}/inspec-test-audit.log"
|
||||
run_result = run_inspec_process("exec " + File.join(profile_path, "basic_profile") + " " + cli_args, env: { CHEF_PREVIEW_AUDIT_LOGGING: "1" })
|
||||
_(run_result.exit_status).must_equal 0
|
||||
|
@ -31,7 +33,8 @@ describe "inspec audit log feature" do
|
|||
_(File.basename(Dir.glob("#{Inspec.log_dir}/*")[0])).must_match(/inspec-test-audit-\d{4}\d{2}\d{2}T\d{2}\d{2}\d{2}-\b\d+\b.log/)
|
||||
end
|
||||
|
||||
it "should create inspec-audit.log file in the default location when inpsec exec run" do
|
||||
it "should create audit log file in the default location when inspec shell is run" do
|
||||
skip_windows!
|
||||
cli_args = " --audit-log-location #{Inspec.log_dir}/inspec-test-audit.log"
|
||||
run_result = run_inspec_process("shell " + " " + cli_args, env: { CHEF_PREVIEW_AUDIT_LOGGING: "1" })
|
||||
_(run_result.exit_status).must_equal 0
|
||||
|
|
Loading…
Reference in a new issue