From bc32e4e84d8839ff30b75e85075f5fcff8c1c6ba Mon Sep 17 00:00:00 2001 From: jcamiel Date: Sun, 4 Dec 2022 18:12:30 +0100 Subject: [PATCH] Fix error message case. --- integration/tests_failed/filter.err | 6 +++--- integration/tests_failed/predicate.err | 2 +- packages/hurl/src/runner/error.rs | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/integration/tests_failed/filter.err b/integration/tests_failed/filter.err index e02e98385..cfad5146d 100644 --- a/integration/tests_failed/filter.err +++ b/integration/tests_failed/filter.err @@ -2,20 +2,20 @@ error: Filter Error --> tests_failed/filter.hurl:4:17 | 4 | jsonpath "$.id" toInt == 123 - | ^^^^^ Invalid Filter Input: string <123x> + | ^^^^^ invalid filter input: string <123x> | error: Filter Error --> tests_failed/filter.hurl:5:21 | 5 | jsonpath "$.status" toInt == 0 - | ^^^^^ Invalid Filter Input: bool + | ^^^^^ invalid filter input: bool | error: Filter Error --> tests_failed/filter.hurl:6:22 | 6 | jsonpath "$.unknown" toInt == 1 - | ^^^^^ Missing value to apply the filter + | ^^^^^ missing value to apply filter | diff --git a/integration/tests_failed/predicate.err b/integration/tests_failed/predicate.err index cc12067d4..935689d79 100644 --- a/integration/tests_failed/predicate.err +++ b/integration/tests_failed/predicate.err @@ -74,7 +74,7 @@ error: Filter Error --> tests_failed/predicate.hurl:14:22 | 14 | jsonpath "$.message" count == 1 - | ^^^^^ Invalid Filter Input: string + | ^^^^^ invalid filter input: string | error: Assert failure diff --git a/packages/hurl/src/runner/error.rs b/packages/hurl/src/runner/error.rs index ca87d0164..c71fe8d3e 100644 --- a/packages/hurl/src/runner/error.rs +++ b/packages/hurl/src/runner/error.rs @@ -137,7 +137,7 @@ impl Error for runner::Error { format!("actual: {}\nexpected: {}{}", actual, expected, additional) } RunnerError::VariableNotDefined { name } => { - format!("You must set the variable {}", name) + format!("you must set the variable {}", name) } RunnerError::UnrenderableVariable { value } => { format!("value {} can not be rendered", value) @@ -158,13 +158,11 @@ impl Error for runner::Error { path.to_str().unwrap() ) } - RunnerError::FilterMissingInput { .. } => { - "Missing value to apply the filter".to_string() - } + RunnerError::FilterMissingInput { .. } => "missing value to apply filter".to_string(), RunnerError::FilterInvalidInput(message) => { - format!("Invalid Filter Input: {}", message) + format!("invalid filter input: {}", message) } - RunnerError::FilterRegexNoCapture { .. } => "Capture not found".to_string(), + RunnerError::FilterRegexNoCapture { .. } => "capture not found".to_string(), } } }