mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 02:28:08 -05:00
fix(stepfunctions)!: reject JSONata top-level references at definition time (#2699)
* fix(stepfunctions)!: reject JSONata top-level references at definition time
A Step Functions JSONata expression is evaluated with no context item: the
execution input arrives as $states.input and an Assign variable as $name. A
path whose first step is a bare name reads a context item that does not exist,
and real AWS refuses the definition from CreateStateMachine,
UpdateStateMachine and ValidateStateMachineDefinition with
UNSUPPORTED_JSONATA_EXPRESSION: Reference to '<name>' at the top level is not
supported. Floci accepted those definitions and failed the execution instead.
Every JSONata string in a JSONata state is now walked before the state machine
is stored, and each distinct top-level name is reported with the message and
the /States/... location AWS prints. Only the first step of a path is read
against the top-level context, so later steps, predicates, sort terms and
group expressions stay legal; a lambda body keeps the defining context and is
walked. Syntax errors and $$ keep their current behaviour.
The parse tree of com.dashjoin:jsonata is package-private and Quarkus loads
application classes and dependency jars under different class loaders, so the
tree fields are read reflectively, resolved once at class initialization and
registered for native image.
BREAKING CHANGE: state machines whose JSONata expressions reference a bare
top-level name are now rejected at creation, as on AWS. Anchor the reference
with $states.input.<name> for input or $<name> for an Assign variable.
* fix(stepfunctions): parse a JSONata payload key named after an ASL field
The deny list of fields AWS does not parse as JSONata was applied to every
key at every depth, so a payload key named Next, Comment, Resource, Retry,
Default, ErrorEquals, Credentials, Branches, ItemProcessor or Iterator hid
its expression. AWS parses a payload whole: `Assign: {"Next": "{% phone %}"}`
and `Arguments: {"Payload": {"Comment": "{% phone %}"}}` are both refused
with `Reference to 'phone' at the top level is not supported.` The deny list
now stops applying once the walk enters Output, Assign, Arguments,
ItemSelector or BatchInput.
The same walk refused `ItemReader.ReaderConfig.CSVHeaders`, which holds
literal column names: `validate-state-machine-definition` returns OK for it
and `create-state-machine` stores the machine, so CSVHeaders joins the list.
---------
Co-authored-by: Facundo Paredes <25681464+facuparedes@users.noreply.github.com>
This commit is contained in:
1 parent
0090739617
commit
5534460492
5 files changed
+742
-22
No files matched your search
+110
@@ -0,0 +1,110 @@
|
||||
package io.github.hectorvent.floci.services.stepfunctions;
|
||||
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Every expression here was run through
|
||||
* {@code aws stepfunctions validate-state-machine-definition --region us-east-1} as the Output of
|
||||
* a one-state Pass machine. The names asserted are the ones AWS puts in
|
||||
* {@code Reference to '<name>' at the top level is not supported.}, and the expressions asserted
|
||||
* empty are the ones AWS answers {@code result: OK}.
|
||||
*/
|
||||
class JsonataTopLevelReferencesTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {
|
||||
"phone",
|
||||
"phone[0].number",
|
||||
"phone.number.street",
|
||||
"-phone",
|
||||
"phone ? 1 : 2",
|
||||
"$states.input.a ? phone : 2",
|
||||
"phone & 'x'",
|
||||
"phone in $states.input.b",
|
||||
"$sum(phone)",
|
||||
"phone(1)",
|
||||
"phone ~> $string()",
|
||||
"[1..phone]",
|
||||
"(phone)",
|
||||
"(phone).other",
|
||||
"[phone].other",
|
||||
"[phone, 1]",
|
||||
"{phone: 1}",
|
||||
"($x := phone; $x)",
|
||||
"$map($states.input.a, function($y){ phone })",
|
||||
"$count(phone[inner])",
|
||||
"phone.**.deeper"})
|
||||
@DisplayName("AWS names the identifier read at the top level")
|
||||
void namesTheTopLevelIdentifier(String expression) {
|
||||
assertEquals(List.of("phone"), JsonataTopLevelReferences.in(expression));
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {
|
||||
"$states.input.phone",
|
||||
"$states.input.a.phone",
|
||||
"$states.input.a[0].phone",
|
||||
"$states.input.a.phone[0]",
|
||||
"$states.input.items[phone > 3]",
|
||||
"$states.input.a^(phone)",
|
||||
"$states.input.a{'k': phone}",
|
||||
"$states.input.a.(phone)",
|
||||
"$states.input.a.$phone",
|
||||
"$phone",
|
||||
"$states.input.a ~> $string()",
|
||||
"$states.input ~> |phone|{'b': 1}|",
|
||||
"**.phone",
|
||||
"{'k': 1}.phone",
|
||||
"$states.input.a[0][phone]",
|
||||
"$states.input.a[$ > 1]",
|
||||
"function($x){ $x.phone }",
|
||||
"$map($states.input.a, function($x){ $x.phone })",
|
||||
"'phone'",
|
||||
"1 + 1",
|
||||
"$now()"})
|
||||
@DisplayName("AWS accepts a name that is not read from the top-level context")
|
||||
void namesNothingWhenTheReferenceIsAnchored(String expression) {
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in(expression));
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {"$", "$.phone", "$[0]", "$string($)",
|
||||
"$map($states.input.a, function($x){ $ })"})
|
||||
@DisplayName("the context item itself is named '$', as AWS names it")
|
||||
void namesTheContextItem(String expression) {
|
||||
assertEquals(List.of("$"), JsonataTopLevelReferences.in(expression));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("'$$' is AWS's separate rule and is left to it")
|
||||
void leavesTheRootReferenceAlone() {
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in("$$"));
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in("$$.phone"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("every distinct name is reported once, in writing order")
|
||||
void reportsEveryDistinctNameOnce() {
|
||||
assertEquals(List.of("aaa", "bbb"), JsonataTopLevelReferences.in("aaa + bbb"));
|
||||
assertEquals(List.of("bbb", "aaa"), JsonataTopLevelReferences.in("[bbb, aaa]"));
|
||||
assertEquals(List.of("aaa"), JsonataTopLevelReferences.in("aaa + aaa"));
|
||||
assertEquals(List.of("aaa", "bbb"), JsonataTopLevelReferences.in("(aaa; bbb)"));
|
||||
assertEquals(List.of("aaa", "bbb"),
|
||||
JsonataTopLevelReferences.in("$number(aaa) + $number(bbb)"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a syntax error names nothing, so the definition stays accepted")
|
||||
void namesNothingWhenTheExpressionDoesNotParse() {
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in("phone[1,2)"));
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in("phone %.other"));
|
||||
assertEquals(List.of(), JsonataTopLevelReferences.in(""));
|
||||
}
|
||||
}
|
||||
+311
@@ -0,0 +1,311 @@
|
||||
package io.github.hectorvent.floci.services.stepfunctions;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.github.hectorvent.floci.testing.RestAssuredJsonUtils;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.restassured.response.Response;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
||||
/**
|
||||
* A JSONata expression that reads the top-level context is refused when the state machine is
|
||||
* created, as real AWS refuses it. Every message and location asserted here was measured with
|
||||
* {@code aws stepfunctions validate-state-machine-definition --region us-east-1} on the same
|
||||
* definition, and the CreateStateMachine wire shape with
|
||||
* {@code aws stepfunctions create-state-machine}.
|
||||
*/
|
||||
@QuarkusTest
|
||||
class StepFunctionsTopLevelReferenceIntegrationTest {
|
||||
|
||||
private static final String CONTENT_TYPE = "application/x-amz-json-1.0";
|
||||
private static final String VALIDATE_TARGET = "AWSStepFunctions.ValidateStateMachineDefinition";
|
||||
private static final String CREATE_TARGET = "AWSStepFunctions.CreateStateMachine";
|
||||
private static final String ROLE_ARN = "arn:aws:iam::000000000000:role/service-role/sfn";
|
||||
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||
|
||||
@BeforeAll
|
||||
static void configure() {
|
||||
RestAssuredJsonUtils.configureAwsContentTypes();
|
||||
}
|
||||
|
||||
private static Response validate(String definition) {
|
||||
return given().contentType(CONTENT_TYPE).header("X-Amz-Target", VALIDATE_TARGET)
|
||||
.body(OBJECT_MAPPER.createObjectNode().put("definition", definition).toString())
|
||||
.when().post("/");
|
||||
}
|
||||
|
||||
private static Response create(String name, String definition) {
|
||||
return given().contentType(CONTENT_TYPE).header("X-Amz-Target", CREATE_TARGET)
|
||||
.body(OBJECT_MAPPER.createObjectNode()
|
||||
.put("name", name)
|
||||
.put("definition", definition)
|
||||
.put("roleArn", ROLE_ARN).toString())
|
||||
.when().post("/");
|
||||
}
|
||||
|
||||
private static void expectTopLevelReference(String definition, String reference, String location) {
|
||||
validate(definition).then().statusCode(200)
|
||||
.body("result", equalTo("FAIL"))
|
||||
.body("diagnostics", hasSize(1))
|
||||
.body("diagnostics[0].severity", equalTo("ERROR"))
|
||||
.body("diagnostics[0].code", equalTo("UNSUPPORTED_JSONATA_EXPRESSION"))
|
||||
.body("diagnostics[0].message", equalTo(
|
||||
"Reference to '" + reference + "' at the top level is not supported."))
|
||||
.body("diagnostics[0].location", equalTo(location));
|
||||
}
|
||||
|
||||
private static void expectAccepted(String definition) {
|
||||
validate(definition).then().statusCode(200)
|
||||
.body("result", equalTo("OK"))
|
||||
.body("diagnostics", hasSize(0));
|
||||
}
|
||||
|
||||
private static String passWithOutput(String output) {
|
||||
return """
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Pass","Output":__OUTPUT__,"End":true}}}
|
||||
""".replace("__OUTPUT__", output);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("CreateStateMachine refuses the definition with AWS's InvalidDefinition message")
|
||||
void createStateMachineRefusesATopLevelReference() {
|
||||
create("top-level-reference-" + System.nanoTime(),
|
||||
passWithOutput("{\"v\":\"{% phone[0] %}\"}"))
|
||||
.then().statusCode(400)
|
||||
.body("__type", equalTo("InvalidDefinition"))
|
||||
.body("message", equalTo("Invalid State Machine Definition: "
|
||||
+ "'UNSUPPORTED_JSONATA_EXPRESSION: Reference to 'phone' at the top level "
|
||||
+ "is not supported. at /States/E/Output/v'"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("CreateStateMachine still accepts the anchored form of the same expression")
|
||||
void createStateMachineAcceptsTheAnchoredForm() {
|
||||
create("anchored-reference-" + System.nanoTime(),
|
||||
passWithOutput("{\"v\":\"{% $states.input.phone[0] %}\"}"))
|
||||
.then().statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Output names the field that holds the expression")
|
||||
void outputField() {
|
||||
expectTopLevelReference(passWithOutput("{\"v\":\"{% phone %}\"}"),
|
||||
"phone", "/States/E/Output/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a nested Output object names the whole path down to the array element")
|
||||
void nestedOutputField() {
|
||||
expectTopLevelReference(passWithOutput("{\"a\":{\"b\":[\"{% phone %}\"]}}"),
|
||||
"phone", "/States/E/Output/a/b[0]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Assign is parsed like Output")
|
||||
void assignField() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Pass","Assign":{"v":"{% phone %}"},"End":true}}}
|
||||
""", "phone", "/States/E/Assign/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a Choice condition names its rule by index")
|
||||
void choiceCondition() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"C","States":{
|
||||
"C":{"Type":"Choice","Choices":[{"Condition":"{% phone = 1 %}","Next":"E"}],
|
||||
"Default":"E"},
|
||||
"E":{"Type":"Pass","End":true}}}
|
||||
""", "phone", "/States/C/Choices[0]/Condition");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Wait Seconds is parsed")
|
||||
void waitSeconds() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Wait","Seconds":"{% phone %}","End":true}}}
|
||||
""", "phone", "/States/E/Seconds");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Fail Cause is parsed")
|
||||
void failCause() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Fail","Cause":"{% phone %}"}}}
|
||||
""", "phone", "/States/E/Cause");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Map Items is parsed and so is every state of its ItemProcessor")
|
||||
void mapItemsAndItemProcessor() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"M","States":{
|
||||
"M":{"Type":"Map","Items":"{% phone %}","ItemProcessor":{
|
||||
"StartAt":"I","States":{"I":{"Type":"Pass","End":true}}},"End":true}}}
|
||||
""", "phone", "/States/M/Items");
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"M","States":{
|
||||
"M":{"Type":"Map","Items":"{% $states.input.a %}","ItemProcessor":{
|
||||
"StartAt":"I","States":{"I":{"Type":"Pass",
|
||||
"Output":{"v":"{% phone %}"},"End":true}}},"End":true}}}
|
||||
""", "phone", "/States/M/ItemProcessor/States/I/Output/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a Parallel branch state names its branch by index")
|
||||
void parallelBranchState() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"P","States":{
|
||||
"P":{"Type":"Parallel","Branches":[{"StartAt":"B","States":{
|
||||
"B":{"Type":"Pass","Output":{"v":"{% phone %}"},"End":true}}}],
|
||||
"End":true}}}
|
||||
""", "phone", "/States/P/Branches[0]/States/B/Output/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a Catch Output names its catcher by index")
|
||||
void catchOutput() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E","States":{
|
||||
"E":{"Type":"Task","Resource":"arn:aws:states:::aws-sdk:s3:listBuckets",
|
||||
"Arguments":{},"Catch":[{"ErrorEquals":["States.ALL"],
|
||||
"Output":{"v":"{% phone %}"},"Next":"F"}],"End":true},
|
||||
"F":{"Type":"Pass","End":true}}}
|
||||
""", "phone", "/States/E/Catch[0]/Output/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("an earlier Assign does not make the bare name legal; only $phone is")
|
||||
void anEarlierAssignDoesNotBindTheBareName() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"A","States":{
|
||||
"A":{"Type":"Pass","Assign":{"phone":"{% 1 %}"},"Next":"E"},
|
||||
"E":{"Type":"Pass","Output":{"v":"{% phone %}"},"End":true}}}
|
||||
""", "phone", "/States/E/Output/v");
|
||||
expectAccepted("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"A","States":{
|
||||
"A":{"Type":"Pass","Assign":{"phone":"{% 1 %}"},"Next":"E"},
|
||||
"E":{"Type":"Pass","Output":{"v":"{% $phone %}"},"End":true}}}
|
||||
""");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("each distinct name in one field gets its own diagnostic")
|
||||
void everyDistinctNameInOneField() {
|
||||
validate(passWithOutput("{\"v\":\"{% aaa + bbb %}\"}"))
|
||||
.then().statusCode(200)
|
||||
.body("result", equalTo("FAIL"))
|
||||
.body("diagnostics", hasSize(2))
|
||||
.body("diagnostics[0].message", equalTo(
|
||||
"Reference to 'aaa' at the top level is not supported."))
|
||||
.body("diagnostics[1].message", equalTo(
|
||||
"Reference to 'bbb' at the top level is not supported."))
|
||||
.body("diagnostics[1].location", equalTo("/States/E/Output/v"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("the context item itself is named '$'")
|
||||
void contextItem() {
|
||||
expectTopLevelReference(passWithOutput("{\"v\":\"{% $.phone %}\"}"),
|
||||
"$", "/States/E/Output/v");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a name reached through $states, a predicate or a variable is accepted")
|
||||
void anchoredExpressionsAreAccepted() {
|
||||
expectAccepted(passWithOutput("{\"v\":\"{% $states.input.phone %}\"}"));
|
||||
expectAccepted(passWithOutput("{\"v\":\"{% $states.input.items[phone > 3] %}\"}"));
|
||||
expectAccepted(passWithOutput("{\"v\":\"{% $map($states.input.a, function($x){ $x.phone }) %}\"}"));
|
||||
expectAccepted(passWithOutput("{\"v\":\"{% $phone %}\"}"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a JSONPath state machine is not parsed as JSONata")
|
||||
void jsonPathMachineIsUntouched() {
|
||||
expectAccepted("""
|
||||
{"StartAt":"E",
|
||||
"States":{"E":{"Type":"Pass","Parameters":{"v":"{% phone %}"},"End":true}}}
|
||||
""");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Comment, Next and ErrorEquals keep a {% %} string as text, as AWS does")
|
||||
void fieldsAwsDoesNotParse() {
|
||||
expectAccepted("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Pass","Comment":"{% phone %}","End":true}}}
|
||||
""");
|
||||
expectAccepted("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E","States":{
|
||||
"E":{"Type":"Task","Resource":"arn:aws:states:::aws-sdk:s3:listBuckets",
|
||||
"Arguments":{},"Retry":[{"ErrorEquals":["{% phone %}"]}],"End":true}}}
|
||||
""");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("ReaderConfig.CSVHeaders holds column names, not expressions, as AWS does")
|
||||
void readerConfigCsvHeadersAreNotParsed() {
|
||||
expectAccepted("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"M","States":{
|
||||
"M":{"Type":"Map",
|
||||
"ItemReader":{"Resource":"arn:aws:states:::s3:getObject",
|
||||
"Arguments":{"Bucket":"b","Key":"k"},
|
||||
"ReaderConfig":{"InputType":"CSV","CSVHeaderLocation":"GIVEN",
|
||||
"CSVHeaders":["{% phone %}"]}},
|
||||
"ItemProcessor":{"StartAt":"I","States":{"I":{"Type":"Pass","End":true}}},
|
||||
"End":true}}}
|
||||
""");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a payload key named after an ASL field is still an expression, as AWS parses it")
|
||||
void aPayloadKeyNamedAfterAnAslFieldIsParsed() {
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E",
|
||||
"States":{"E":{"Type":"Pass","Assign":{"Next":"{% phone %}"},"End":true}}}
|
||||
""", "phone", "/States/E/Assign/Next");
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E","States":{
|
||||
"E":{"Type":"Task","Resource":"arn:aws:states:::lambda:invoke",
|
||||
"Arguments":{"FunctionName":"f","Payload":{"Comment":"{% phone %}"}},
|
||||
"End":true}}}
|
||||
""", "phone", "/States/E/Arguments/Payload/Comment");
|
||||
expectTopLevelReference(passWithOutput("{\"ItemProcessor\":{\"Iterator\":\"{% phone %}\"}}"),
|
||||
"phone", "/States/E/Output/ItemProcessor/Iterator");
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"M","States":{
|
||||
"M":{"Type":"Map","ItemSelector":{"Next":"{% phone %}"},
|
||||
"ItemProcessor":{"StartAt":"I","States":{"I":{"Type":"Pass","End":true}}},
|
||||
"End":true}}}
|
||||
""", "phone", "/States/M/ItemSelector/Next");
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"M","States":{
|
||||
"M":{"Type":"Map","ItemBatcher":{"BatchInput":{"Comment":"{% phone %}"}},
|
||||
"ItemProcessor":{"StartAt":"I","States":{"I":{"Type":"Pass","End":true}}},
|
||||
"End":true}}}
|
||||
""", "phone", "/States/M/ItemBatcher/BatchInput/Comment");
|
||||
expectTopLevelReference("""
|
||||
{"QueryLanguage":"JSONata","StartAt":"E","States":{
|
||||
"E":{"Type":"Task","Resource":"arn:aws:states:::lambda:invoke",
|
||||
"Arguments":{"FunctionName":"f"},
|
||||
"Catch":[{"ErrorEquals":["States.ALL"],"Assign":{"Retry":"{% phone %}"},
|
||||
"Next":"D"}],"End":true},
|
||||
"D":{"Type":"Pass","End":true}}}
|
||||
""", "phone", "/States/E/Catch[0]/Assign/Retry");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a syntax error is left to the execution, as it is today")
|
||||
void syntaxErrorsAreOutOfScope() {
|
||||
expectAccepted(passWithOutput("{\"v\":\"{% phone[1,2) %}\"}"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user