Disable audit log in test environment unless and until explicitly --enable-audit-log option is provided in test

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
This commit is contained in:
Vasu1105 2023-11-02 14:34:36 +05:30
parent e6f430b2fa
commit 5be4096bb3

View file

@ -154,6 +154,8 @@ module FunctionalHelper
end
def inspec(commandline, prefix = nil)
# Turn off audit logs in test environment unless and until the --enable-audit-log options is provided in test
commandline += " --no-enable-audit-log" if (commandline.match?(/exec/) || commandline.match?(/shell/)) && !commandline.match?(/--enable-audit-log/)
run_cmd "#{exec_inspec} #{commandline}", prefix
end