You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "fjtirado (via GitHub)" <gi...@apache.org> on 2023/09/27 16:04:41 UTC
[GitHub] [incubator-kie-kogito-runtimes] fjtirado commented on a diff in pull request #3239: [KOGITO-9844] Enhace jq validation to detect invalid functions
fjtirado commented on code in PR #3239:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/3239#discussion_r1338845208
##########
kogito-serverless-workflow/kogito-jq-expression/src/test/java/org/kie/kogito/expr/jq/JqExpressionHandlerTest.java:
##########
@@ -275,6 +275,12 @@ void testMagicWordsExpressions(String expression, String expectedResult, KogitoP
assertThat(parsedExpression.eval(getObjectNode(), String.class, context)).isEqualTo(expectedResult);
}
+ @Test
+ void testHardcodedStringIsValidOrNot() {
+ assertThat(ExpressionHandlerFactory.get("jq", "kserve_payload = to_kserve(image)").isValid()).isFalse();
Review Comment:
isValid was returning true before this PR for that expression
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org