Skip to content
Snippets Groups Projects
Commit dcf60dc9 authored by Kieran van Gaalen's avatar Kieran van Gaalen
Browse files

Fixing tests

parent 60cbd81f
No related branches found
No related tags found
1 merge request!1Big merge
......@@ -1091,7 +1091,7 @@ func TestSingleJunctionFiveEntitiesThreeEntityFilters(t *testing.T) {
FILTER e_3.seats < 10
FILTER r2._from == e_2._id AND r2._to == e_3._id
FILTER length(e_3) != 0 AND length(r2) != 0
RETURN {"nodes":union_distinct([e_3], []), "rel": union_distinct([r2], [])}
RETURN {"nodes":union_distinct([e_3], []), "rel": union_distinct([r2], []), "mod": union_distinct([], [])}
)
LET e4 = (
FOR e_4 IN resolutions
......@@ -1099,20 +1099,20 @@ func TestSingleJunctionFiveEntitiesThreeEntityFilters(t *testing.T) {
FILTER e_4.date LIKE "%mei%"
FILTER r3._from == e_2._id AND r3._to == e_4._id
FILTER length(e_4) != 0 AND length(r3) != 0
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], [])}
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], []), "mod": union_distinct([], [])}
)
FILTER length(e3) != 0 AND length(e4) != 0 AND length(e_2) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct(flatten(e3[**].nodes), flatten(e4[**].nodes), [e_2]), "rel": union_distinct(flatten(e3[**].rel), flatten(e4[**].rel), [r1])}
RETURN {"nodes":union_distinct(flatten(e3[**].nodes), flatten(e4[**].nodes), [e_2]), "rel": union_distinct(flatten(e3[**].rel), flatten(e4[**].rel), [r1]), "mod": union_distinct(flatten(e3[**].mod), flatten(e4[**].mod), [])}
)
FILTER length(e2) != 0 AND length(e_1) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_1]), "rel": union_distinct(flatten(e2[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_1]), "rel": union_distinct(flatten(e2[**].rel), [r0]), "mod": union_distinct(flatten(e2[**].mod), [])}
)
FILTER length(e1) != 0 AND length(e_0) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), []), "mod": union_distinct(flatten(e1[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -1345,7 +1345,7 @@ func TestDoubleJunctionNineEntitiesThreeEntityFilters(t *testing.T) {
FOR r4 IN submits
FILTER r4._from == e_0._id AND r4._to == e_5._id
FILTER length(e_5) != 0 AND length(r4) != 0
RETURN {"nodes":union_distinct([e_5], []), "rel": union_distinct([r4], [])}
RETURN {"nodes":union_distinct([e_5], []), "rel": union_distinct([r4], []), "mod": union_distinct([], [])}
)
LET e6 = (
FOR e_6 IN parties
......@@ -1356,16 +1356,16 @@ func TestDoubleJunctionNineEntitiesThreeEntityFilters(t *testing.T) {
FOR r6 IN member_of
FILTER r6._from == e_7._id AND r6._to == e_6._id
FILTER length(e_7) != 0 AND length(r6) != 0
RETURN {"nodes":union_distinct([e_7], []), "rel": union_distinct([r6], [])}
RETURN {"nodes":union_distinct([e_7], []), "rel": union_distinct([r6], []), "mod": union_distinct([], [])}
)
FILTER length(e7) != 0 AND length(e_6) != 0 AND length(r5) != 0
RETURN {"nodes":union_distinct(flatten(e7[**].nodes), [e_6]), "rel": union_distinct(flatten(e7[**].rel), [r5])}
RETURN {"nodes":union_distinct(flatten(e7[**].nodes), [e_6]), "rel": union_distinct(flatten(e7[**].rel), [r5]), "mod": union_distinct(flatten(e7[**].mod), [])}
)
FILTER length(e5) != 0 AND length(e6) != 0 AND length(e_0) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct(flatten(e5[**].nodes), flatten(e6[**].nodes), [e_0]), "rel": union_distinct(flatten(e5[**].rel), flatten(e6[**].rel), [r0])}
RETURN {"nodes":union_distinct(flatten(e5[**].nodes), flatten(e6[**].nodes), [e_0]), "rel": union_distinct(flatten(e5[**].rel), flatten(e6[**].rel), [r0]), "mod": union_distinct(flatten(e5[**].mod), flatten(e6[**].mod), [])}
)
FILTER length(e0) != 0 AND length(e_1) != 0 AND length(r1) != 0
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [r1])}
RETURN {"nodes":union_distinct(flatten(e0[**].nodes), [e_1]), "rel": union_distinct(flatten(e0[**].rel), [r1]), "mod": union_distinct(flatten(e0[**].mod), [])}
)
LET e4 = (
FOR e_4 IN resolutions
......@@ -1373,17 +1373,17 @@ func TestDoubleJunctionNineEntitiesThreeEntityFilters(t *testing.T) {
FILTER e_4.date LIKE "%mei%"
FILTER r3._from == e_2._id AND r3._to == e_4._id
FILTER length(e_4) != 0 AND length(r3) != 0
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], [])}
RETURN {"nodes":union_distinct([e_4], []), "rel": union_distinct([r3], []), "mod": union_distinct([], [])}
)
FILTER length(e1) != 0 AND length(e4) != 0 AND length(e_2) != 0 AND length(r2) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), flatten(e4[**].nodes), [e_2]), "rel": union_distinct(flatten(e1[**].rel), flatten(e4[**].rel), [r2])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), flatten(e4[**].nodes), [e_2]), "rel": union_distinct(flatten(e1[**].rel), flatten(e4[**].rel), [r2]), "mod": union_distinct(flatten(e1[**].mod), flatten(e4[**].mod), [])}
)
FILTER length(e2) != 0 AND length(e_3) != 0
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_3]), "rel": union_distinct(flatten(e2[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e2[**].nodes), [e_3]), "rel": union_distinct(flatten(e2[**].rel), []), "mod": union_distinct(flatten(e2[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......@@ -1476,14 +1476,14 @@ func TestTwoEntitiesOneEntityFilterOneRelationFilter(t *testing.T) {
FILTER r0.Day == 15
FILTER r0._from == e_0._id AND r0._to == e_1._id
FILTER length(e_1) != 0 AND length(r0) != 0
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], [])}
RETURN {"nodes":union_distinct([e_1], []), "rel": union_distinct([r0], []), "mod": union_distinct([], [])}
)
FILTER length(e1) != 0 AND length(e_0) != 0
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), [])}
RETURN {"nodes":union_distinct(flatten(e1[**].nodes), [e_0]), "rel": union_distinct(flatten(e1[**].rel), []), "mod": union_distinct(flatten(e1[**].mod), [])}
)
let nodes = union_distinct(flatten(result[**].nodes),[])
let edges = union_distinct(flatten(result[**].rel),[])
return {"vertices":nodes,"edges":edges}`)
LET nodes = union_distinct(flatten(result[**].nodes),[])
LET edges = union_distinct(flatten(result[**].rel),[])
RETURN {"vertices":nodes,"edges":edges}`)
regExCleaner := regexp.MustCompile(`\s+`)
correctCleanedResult := regExCleaner.ReplaceAllString(string(correctConvertedResult), " ")
convertedCleanedResult := regExCleaner.ReplaceAllString(*convertedResult, " ")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment