Linting and test number corrections

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-08-28 20:35:20 -04:00
parent 6b618b6b83
commit eb1ec437d7
2 changed files with 13 additions and 13 deletions

View file

@ -20,8 +20,8 @@ describe "waivers" do
describe "a fully pre-slugged control file" do
it "has all of the expected outcomes" do
cmd = "exec #{waivers_profiles_path}/basic --input-file #{waivers_profiles_path}/basic/files/waivers.yaml"
run_result = run_inspec_process(cmd,json: true)
controls_by_id = run_result.payload.json["profiles"][0]["controls"].map {|c| [c["id"], c] }.to_h
run_result = run_inspec_process(cmd, json: true)
controls_by_id = run_result.payload.json["profiles"][0]["controls"].map { |c| [c["id"], c] }.to_h
[
"01_not_waivered_passes",
@ -45,10 +45,10 @@ describe "waivers" do
end
# Each of these should have been forced to skip by the waiver system
[
"05_waivered_no_expiry_skipped",
"11_waivered_expiry_in_future_skipped"
].each do |control_id|
%w{
05_waivered_no_expiry_skipped
11_waivered_expiry_in_future_skipped
}.each do |control_id|
result = controls_by_id[control_id]["results"][0]
assert_test_outcome "skipped", result
assert_waiver_annotation result
@ -56,10 +56,10 @@ describe "waivers" do
# Each of these should have had a failure, but had a waiver annotation
# added to the output.
[
"04_waivered_no_expiry_not_skipped_fails",
"10_waivered_expiry_in_future_not_skipped_fails"
].each do |control_id|
%w{
04_waivered_no_expiry_not_skipped_fails
10_waivered_expiry_in_future_not_skipped_fails
}.each do |control_id|
result = controls_by_id[control_id]["results"][0]
assert_test_outcome "failed", result
assert_waiver_annotation result

View file

@ -28,17 +28,17 @@ waiver_08_waivered_expiry_in_past_skipped:
justification: Contrariness
skip: yes
waiver_06_waivered_expiry_in_future_not_skipped_passes:
waiver_09_waivered_expiry_in_future_not_skipped_passes:
expiration_date: 2077-06-01
justification: Handwaving
skip: no
waiver_07_waivered_expiry_in_future_not_skipped_fails:
waiver_10_waivered_expiry_in_future_not_skipped_fails:
expiration_date: 2077-06-01
justification: Didn't feel like it
skip: no
waiver_08_waivered_expiry_in_future_skipped:
waiver_11_waivered_expiry_in_future_skipped:
expiration_date: 2077-06-01
justification: Lack of imagination
skip: yes