mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Fix logic error for future expiring waivers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
9fd0fb242c
commit
5d94440823
2 changed files with 2 additions and 2 deletions
|
@ -312,8 +312,8 @@ module Inspec
|
|||
# It appears that yaml.rb automagically parses dates for us
|
||||
if expiry < Date.today # If the waiver expired, return - no skip applied
|
||||
__waiver_data["message"] = "Waiver expired on #{expiry}, evaluating control normally"
|
||||
return
|
||||
end
|
||||
return
|
||||
else
|
||||
ui = Inspec::UI.new
|
||||
ui.error("Unable to parse waiver expiration date '#{expiry}' for control #{@__rule_id}")
|
||||
|
|
|
@ -8,7 +8,7 @@ describe "waivers" do
|
|||
let(:cmd) { "exec #{waivers_profiles_path}/#{profile_name} --input-file #{waivers_profiles_path}/#{profile_name}/files/#{waiver_file}" }
|
||||
|
||||
def assert_test_outcome(expected, control_id)
|
||||
assert_equal expected, controls_by_id.dig(control_id, "results", 0, "status")
|
||||
assert_equal "#{control_id}_#{expected}", "#{control_id}_#{controls_by_id.dig(control_id, "results", 0, "status")}"
|
||||
end
|
||||
|
||||
def assert_waiver_annotation(control_id)
|
||||
|
|
Loading…
Reference in a new issue