Skip to content

Commit 2d52018

Browse files
committed
feat: adjusted tests to latest definitions
1 parent 00f831b commit 2d52018

9 files changed

Lines changed: 119 additions & 4 deletions

crates/taurus-core/src/runtime/engine.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,8 @@ mod tests {
11951195
vec![
11961196
literal_param(100, "http_status_code", int_value(200)),
11971197
literal_param(101, "headers", empty_struct_value()),
1198-
literal_param(102, "payload", string_value("hello")),
1198+
literal_param(102, "http_schema", string_value("application/json")),
1199+
literal_param(103, "payload", string_value("hello")),
11991200
],
12001201
None,
12011202
);
@@ -1207,14 +1208,18 @@ mod tests {
12071208

12081209
let node_result = &report.node_execution_results[0];
12091210
assert_node_result_id(node_result, 1);
1210-
assert_eq!(node_result.parameter_results.len(), 3);
1211+
assert_eq!(node_result.parameter_results.len(), 4);
12111212
assert_eq!(node_result.parameter_results[0].value, Some(int_value(200)));
12121213
assert_eq!(
12131214
node_result.parameter_results[1].value,
12141215
Some(empty_struct_value())
12151216
);
12161217
assert_eq!(
12171218
node_result.parameter_results[2].value,
1219+
Some(string_value("application/json"))
1220+
);
1221+
assert_eq!(
1222+
node_result.parameter_results[3].value,
12181223
Some(string_value("hello"))
12191224
);
12201225
assert!(matches!(
@@ -1434,7 +1439,8 @@ mod tests {
14341439
vec![
14351440
literal_param(1, "http_status_code", int_value(200)),
14361441
literal_param(2, "headers", empty_struct_value()),
1437-
literal_param(3, "payload", string_value("20")),
1442+
literal_param(3, "http_schema", string_value("text/plain")),
1443+
literal_param(4, "payload", string_value("20")),
14381444
],
14391445
None,
14401446
);
@@ -1576,7 +1582,8 @@ mod tests {
15761582
vec![
15771583
literal_param(100, "http_status_code", int_value(200)),
15781584
literal_param(101, "headers", empty_struct_value()),
1579-
literal_param(102, "payload", string_value("hello")),
1585+
literal_param(102, "http_schema", string_value("application/json")),
1586+
literal_param(103, "payload", string_value("hello")),
15801587
],
15811588
Some(2),
15821589
);

flows/01_return_object.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@
4747
}
4848
}
4949
},
50+
{
51+
"databaseId": "4",
52+
"runtimeParameterId": "http_schema",
53+
"value": {
54+
"literalValue": {
55+
"stringValue": "application/json"
56+
}
57+
}
58+
},
5059
{
5160
"databaseId": "3",
5261
"runtimeParameterId": "payload",

flows/02_return_flow_input.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@
7575
}
7676
}
7777
},
78+
{
79+
"databaseId": "8",
80+
"runtimeParameterId": "http_schema",
81+
"value": {
82+
"literalValue": {
83+
"stringValue": "application/json"
84+
}
85+
}
86+
},
7887
{
7988
"databaseId": "7",
8089
"runtimeParameterId": "payload",

flows/05_if_control.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@
9696
}
9797
}
9898
},
99+
{
100+
"databaseId": "57",
101+
"runtimeParameterId": "http_schema",
102+
"value": {
103+
"literalValue": {
104+
"stringValue": "application/json"
105+
}
106+
}
107+
},
99108
{
100109
"databaseId": "56",
101110
"runtimeParameterId": "payload",
@@ -166,6 +175,15 @@
166175
}
167176
}
168177
},
178+
{
179+
"databaseId": "54",
180+
"runtimeParameterId": "http_schema",
181+
"value": {
182+
"literalValue": {
183+
"stringValue": "application/json"
184+
}
185+
}
186+
},
169187
{
170188
"databaseId": "53",
171189
"runtimeParameterId": "payload",

flows/06_if_else_control.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@
9696
}
9797
}
9898
},
99+
{
100+
"databaseId": "80",
101+
"runtimeParameterId": "http_schema",
102+
"value": {
103+
"literalValue": {
104+
"stringValue": "application/json"
105+
}
106+
}
107+
},
99108
{
100109
"databaseId": "79",
101110
"runtimeParameterId": "payload",
@@ -176,6 +185,15 @@
176185
}
177186
}
178187
},
188+
{
189+
"databaseId": "76",
190+
"runtimeParameterId": "http_schema",
191+
"value": {
192+
"literalValue": {
193+
"stringValue": "application/json"
194+
}
195+
}
196+
},
179197
{
180198
"databaseId": "75",
181199
"runtimeParameterId": "payload",

flows/07_simple_return.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@
212212
}
213213
}
214214
},
215+
{
216+
"databaseId": "38",
217+
"runtimeParameterId": "http_schema",
218+
"value": {
219+
"literalValue": {
220+
"stringValue": "application/json"
221+
}
222+
}
223+
},
215224
{
216225
"databaseId": "37",
217226
"runtimeParameterId": "payload",

flows/09_filter_return.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,15 @@
345345
}
346346
}
347347
},
348+
{
349+
"databaseId": "32",
350+
"runtimeParameterId": "http_schema",
351+
"value": {
352+
"literalValue": {
353+
"stringValue": "application/json"
354+
}
355+
}
356+
},
348357
{
349358
"databaseId": "31",
350359
"runtimeParameterId": "payload",

flows/10_multiple_respond.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,15 @@
332332
}
333333
}
334334
},
335+
{
336+
"databaseId": "32",
337+
"runtimeParameterId": "http_schema",
338+
"value": {
339+
"literalValue": {
340+
"stringValue": "application/json"
341+
}
342+
}
343+
},
335344
{
336345
"databaseId": "31",
337346
"runtimeParameterId": "payload",
@@ -375,6 +384,15 @@
375384
}
376385
}
377386
},
387+
{
388+
"databaseId": "32",
389+
"runtimeParameterId": "http_schema",
390+
"value": {
391+
"literalValue": {
392+
"stringValue": "application/json"
393+
}
394+
}
395+
},
378396
{
379397
"databaseId": "31",
380398
"runtimeParameterId": "payload",
@@ -417,6 +435,15 @@
417435
}
418436
}
419437
},
438+
{
439+
"databaseId": "32",
440+
"runtimeParameterId": "http_schema",
441+
"value": {
442+
"literalValue": {
443+
"stringValue": "application/json"
444+
}
445+
}
446+
},
420447
{
421448
"databaseId": "31",
422449
"runtimeParameterId": "payload",

flows/12_for_each_function_subflow.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
}
4343
}
4444
},
45+
{
46+
"databaseId": "4",
47+
"runtimeParameterId": "http_schema",
48+
"value": {
49+
"literalValue": {
50+
"stringValue": "application/json"
51+
}
52+
}
53+
},
4554
{
4655
"databaseId": "3",
4756
"runtimeParameterId": "payload",

0 commit comments

Comments
 (0)