From 788b00eb432b024c081040563b3f4fd903085fe7 Mon Sep 17 00:00:00 2001 From: Kesha Hietala Date: Tue, 4 Jun 2024 10:57:57 -0400 Subject: [PATCH] followup to cedar#837 --- cedar-testing/tests/cedar-policy-cli/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cedar-testing/tests/cedar-policy-cli/main.rs b/cedar-testing/tests/cedar-policy-cli/main.rs index c6984a864..7580a3e5d 100644 --- a/cedar-testing/tests/cedar-policy-cli/main.rs +++ b/cedar-testing/tests/cedar-policy-cli/main.rs @@ -96,7 +96,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { Decision::Deny, "test {} failed for request \"{}\" \n Parse errors should only occur for deny", jsonfile.display(), - &json_request.desc + &json_request.description ); assert!( parse_errs @@ -118,7 +118,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { .arg("--schema-format") .arg("human") .assert() - .append_context("validation", json_request.desc.clone()); + .append_context("validation", json_request.description.clone()); if test.should_validate { validation_cmd.success(); // assert it succeeded @@ -165,7 +165,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { .arg("human") .arg("--verbose") // so that reasons are displayed .assert() - .append_context("authorization", json_request.desc.clone()); + .append_context("authorization", json_request.description.clone()); let authorize_cmd = match json_request.decision { Decision::Deny => authorize_cmd.code(2), @@ -180,7 +180,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { output.contains(&error.to_string()), "test {} failed for request \"{}\": output does not contain expected error {error:?}.\noutput was: {output}\nstderr was: {}", jsonfile.display(), - &json_request.desc, + &json_request.description, String::from_utf8(authorize_cmd.get_output().stderr.clone()).expect("stderr should be valid UTF-8"), ); } @@ -190,7 +190,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { output.contains("no policies applied to this request"), "test {} failed for request \"{}\": output does not contain the string \"no policies applied to this request\", as expected.\noutput was: {output}\nstderr was: {}", jsonfile.display(), - &json_request.desc, + &json_request.description, String::from_utf8(authorize_cmd.get_output().stderr.clone()).expect("stderr should be valid UTF-8"), ); } else { @@ -200,7 +200,7 @@ fn perform_integration_test_from_json(jsonfile: impl AsRef) { output.contains(&reason.to_string()), "test {} failed for request \"{}\": output does not contain the reason string {reason:?}.\noutput was: {output}\nstderr was: {}", jsonfile.display(), - &json_request.desc, + &json_request.description, String::from_utf8(authorize_cmd.get_output().stderr.clone()).expect("stderr should be valid UTF-8"), ); }