Skip to content

Commit ea05bd0

Browse files
committed
Merge branch 'develop' of https://github.com/GoRethink/gorethink into develop
2 parents 64076e7 + 4ca4bec commit ea05bd0

File tree

75 files changed

+3613
-3502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3613
-3502
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ _testmain.go
2727
.wercker
2828

2929
cover.html
30+
.idea/

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ go:
44
- 1.7.x
55
- 1.8.x
66
- 1.9.x
7+
- 1.10.x
8+
- 1.11.x
79
- tip
810

911
cache: apt
@@ -18,7 +20,7 @@ before_script:
1820
- sudo apt-get update
1921
- sudo apt-get install rethinkdb
2022
- rethinkdb > /dev/null 2>&1 &
21-
- rethinkdb --port-offset 1 --directory rethinkdb_data1 --join localhost:29016 > /dev/null 2>&1 &
23+
- rethinkdb --port-offset 1 --directory rethinkdb_data1 > /dev/null 2>&1 &
2224
- rethinkdb --port-offset 2 --directory rethinkdb_data2 --join localhost:29016 > /dev/null 2>&1 &
2325
- rethinkdb --port-offset 3 --directory rethinkdb_data3 --join localhost:29016 > /dev/null 2>&1 &
2426

internal/compare/expected.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ func PartialMatch(v interface{}) Expected {
4545
Val: v,
4646
}
4747
}
48+
49+
//func ContainsMatch(containsAllThis interface{}) Expected {
50+
// return Expected{
51+
// Ordered: false,
52+
// Partial: false,
53+
// Val: v,
54+
// }
55+
//}

internal/integration/reql_tests/common.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ func runAndAssert(suite suite.Suite, expected, v interface{}, session *r.Session
5757

5858
func fetchAndAssert(suite suite.Suite, expected, result interface{}, count int) {
5959
switch v := expected.(type) {
60-
case Expected:
60+
case compare.Expected:
6161
v.Fetch = true
6262
v.FetchCount = count
6363

6464
expected = v
6565
default:
66-
expected = Expected(compare.Expected{
66+
expected = compare.Expected(compare.Expected{
6767
Val: v,
6868
Fetch: true,
6969
FetchCount: count,
@@ -105,17 +105,15 @@ func assertExpected(suite suite.Suite, expected interface{}, obtainedCursor *r.C
105105
switch expected := expected.(type) {
106106
case Err:
107107
expected.assert(suite, obtainedCursor, obtainedErr)
108-
case Expected:
109-
expected.assert(suite, obtainedCursor, obtainedErr)
108+
case compare.Expected:
109+
assert(suite, expected, obtainedCursor, obtainedErr)
110110
default:
111-
Expected(compare.Expected{Val: expected}).assert(suite, obtainedCursor, obtainedErr)
111+
assert(suite, compare.Expected{Val: expected}, obtainedCursor, obtainedErr)
112112
}
113113
}
114114

115-
type Expected compare.Expected
116-
117-
func (expected Expected) assert(suite suite.Suite, obtainedCursor *r.Cursor, obtainedErr error) {
118-
if suite.NoError(obtainedErr, "Query returned unexpected error") {
115+
func assert(suite suite.Suite, expected compare.Expected, obtainedCursor *r.Cursor, obtainedErr error) {
116+
if !suite.NoError(obtainedErr, "Query returned unexpected error") {
119117
return
120118
}
121119

@@ -217,7 +215,7 @@ func (expected Err) assert(suite suite.Suite, obtainerCursor *r.Cursor, obtained
217215
obtainedErr = obtainerCursor.All(&res)
218216
}
219217

220-
if suite.Error(obtainedErr) {
218+
if !suite.Error(obtainedErr) {
221219
return
222220
}
223221

internal/integration/reql_tests/reql_aggregation_test.go

Lines changed: 319 additions & 319 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/integration/reql_tests/reql_changefeeds_edge_test.go

Lines changed: 64 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/integration/reql_tests/reql_changefeeds_idxcopy_test.go

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)