Skip to content

Commit d90fd0e

Browse files
committed
Formatted files
1 parent 9cbb4da commit d90fd0e

File tree

2 files changed

+51
-51
lines changed

2 files changed

+51
-51
lines changed

tests/load_balancer_test.go

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -135,54 +135,54 @@ func LoadBalancingCursorSubtest(t *testing.T, useVst bool) {
135135
ExpectedDocuments: collectionData["books"],
136136
DocumentType: reflect.TypeOf(Book{}),
137137
},
138-
/* queryTest{
139-
Query: "FOR d IN books FILTER d.Title==@title SORT d.Title RETURN d",
140-
BindVars: map[string]interface{}{"title": "Book 02"},
141-
ExpectSuccess: true,
142-
ExpectedDocuments: []interface{}{collectionData["books"][1]},
143-
DocumentType: reflect.TypeOf(Book{}),
144-
},
145-
queryTest{
146-
Query: "FOR d IN books FILTER d.Title==@title SORT d.Title RETURN d",
147-
BindVars: map[string]interface{}{"somethingelse": "Book 02"},
148-
ExpectSuccess: false, // Unknown `@title`
149-
},
150-
queryTest{
151-
Query: "FOR u IN users FILTER u.age>100 SORT u.name RETURN u",
152-
ExpectSuccess: true,
153-
ExpectedDocuments: []interface{}{},
154-
DocumentType: reflect.TypeOf(UserDoc{}),
155-
},
156-
queryTest{
157-
Query: "FOR u IN users FILTER u.age<@maxAge SORT u.name RETURN u",
158-
BindVars: map[string]interface{}{"maxAge": 20},
159-
ExpectSuccess: true,
160-
ExpectedDocuments: []interface{}{collectionData["users"][2], collectionData["users"][0], collectionData["users"][5]},
161-
DocumentType: reflect.TypeOf(UserDoc{}),
162-
},
163-
queryTest{
164-
Query: "FOR u IN users FILTER u.age<@maxAge SORT u.name RETURN u",
165-
BindVars: map[string]interface{}{"maxage": 20},
166-
ExpectSuccess: false, // `@maxage` versus `@maxAge`
167-
},
168-
queryTest{
169-
Query: "FOR u IN users SORT u.age RETURN u.age",
170-
ExpectedDocuments: []interface{}{12, 12, 13, 25, 42, 67},
171-
DocumentType: reflect.TypeOf(12),
172-
ExpectSuccess: true,
173-
},
174-
queryTest{
175-
Query: "FOR p IN users COLLECT a = p.age WITH COUNT INTO c SORT a RETURN [a, c]",
176-
ExpectedDocuments: []interface{}{[]int{12, 2}, []int{13, 1}, []int{25, 1}, []int{42, 1}, []int{67, 1}},
177-
DocumentType: reflect.TypeOf([]int{}),
178-
ExpectSuccess: true,
179-
},
180-
queryTest{
181-
Query: "FOR u IN users SORT u.name RETURN u.name",
182-
ExpectedDocuments: []interface{}{"Blair", "Clair", "Jake", "John", "Johnny", "Zz"},
183-
DocumentType: reflect.TypeOf("foo"),
184-
ExpectSuccess: true,
185-
},*/
138+
/* queryTest{
139+
Query: "FOR d IN books FILTER d.Title==@title SORT d.Title RETURN d",
140+
BindVars: map[string]interface{}{"title": "Book 02"},
141+
ExpectSuccess: true,
142+
ExpectedDocuments: []interface{}{collectionData["books"][1]},
143+
DocumentType: reflect.TypeOf(Book{}),
144+
},
145+
queryTest{
146+
Query: "FOR d IN books FILTER d.Title==@title SORT d.Title RETURN d",
147+
BindVars: map[string]interface{}{"somethingelse": "Book 02"},
148+
ExpectSuccess: false, // Unknown `@title`
149+
},
150+
queryTest{
151+
Query: "FOR u IN users FILTER u.age>100 SORT u.name RETURN u",
152+
ExpectSuccess: true,
153+
ExpectedDocuments: []interface{}{},
154+
DocumentType: reflect.TypeOf(UserDoc{}),
155+
},
156+
queryTest{
157+
Query: "FOR u IN users FILTER u.age<@maxAge SORT u.name RETURN u",
158+
BindVars: map[string]interface{}{"maxAge": 20},
159+
ExpectSuccess: true,
160+
ExpectedDocuments: []interface{}{collectionData["users"][2], collectionData["users"][0], collectionData["users"][5]},
161+
DocumentType: reflect.TypeOf(UserDoc{}),
162+
},
163+
queryTest{
164+
Query: "FOR u IN users FILTER u.age<@maxAge SORT u.name RETURN u",
165+
BindVars: map[string]interface{}{"maxage": 20},
166+
ExpectSuccess: false, // `@maxage` versus `@maxAge`
167+
},
168+
queryTest{
169+
Query: "FOR u IN users SORT u.age RETURN u.age",
170+
ExpectedDocuments: []interface{}{12, 12, 13, 25, 42, 67},
171+
DocumentType: reflect.TypeOf(12),
172+
ExpectSuccess: true,
173+
},
174+
queryTest{
175+
Query: "FOR p IN users COLLECT a = p.age WITH COUNT INTO c SORT a RETURN [a, c]",
176+
ExpectedDocuments: []interface{}{[]int{12, 2}, []int{13, 1}, []int{25, 1}, []int{42, 1}, []int{67, 1}},
177+
DocumentType: reflect.TypeOf([]int{}),
178+
ExpectSuccess: true,
179+
},
180+
queryTest{
181+
Query: "FOR u IN users SORT u.name RETURN u.name",
182+
ExpectedDocuments: []interface{}{"Blair", "Clair", "Jake", "John", "Johnny", "Zz"},
183+
DocumentType: reflect.TypeOf("foo"),
184+
ExpectSuccess: true,
185+
},*/
186186
}
187187

188188
var r driver.Response
@@ -247,7 +247,7 @@ func LoadBalancingCursorSubtest(t *testing.T, useVst bool) {
247247
t.Error("HasMore returned false, but ReadDocument returns a document")
248248
}
249249
result = append(result, doc.Elem().Interface())
250-
if (wasForwarded(&r)) {
250+
if wasForwarded(&r) {
251251
someRequestForwarded = true
252252
}
253253
time.Sleep(200 * time.Millisecond)

tests/test_util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ func createArangodVSTConfigForDNSNames(ctx context.Context, cli corev1.CoreV1Int
103103
tlsConfig = &tls.Config{InsecureSkipVerify: true}
104104
}
105105
transport := vstProtocol.TransportConfig{
106-
IdleConnTimeout: 100 * time.Millisecond,
107-
Version: vstProtocol.Version1_1,
106+
IdleConnTimeout: 100 * time.Millisecond,
107+
Version: vstProtocol.Version1_1,
108108
}
109109
connConfig := vst.ConnectionConfig{
110110
TLSConfig: tlsConfig,

0 commit comments

Comments
 (0)