Skip to content

Commit a0635f5

Browse files
authored
Merge pull request #191 from jiangz222/master
mongo official driver to 1.7.1
2 parents 1bffefb + 17def20 commit a0635f5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ go 1.16
55
require (
66
github.com/go-playground/validator/v10 v10.4.1
77
github.com/stretchr/testify v1.6.1
8-
go.mongodb.org/mongo-driver v1.5.1
8+
go.mongodb.org/mongo-driver v1.7.1
99
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM
103103
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
104104
go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI=
105105
go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw=
106+
go.mongodb.org/mongo-driver v1.7.1 h1:jwqTeEM3x6L9xDXrCxN0Hbg7vdGfPBOTIkr0+/LYZDA=
107+
go.mongodb.org/mongo-driver v1.7.1/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8=
106108
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
107109
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
108110
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=

query_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,11 @@ func TestQuery_Distinct(t *testing.T) {
435435
err = cli.Find(context.Background(), filter2).Distinct("age", &res5)
436436
ast.EqualError(err, ErrQueryResultTypeInconsistent.Error())
437437

438-
var res6 []int32
439-
440-
err = cli.Find(context.Background(), filter2).Distinct("", &res6)
441-
ast.NoError(err)
442-
ast.Equal(0, len(res6))
438+
// different behavior with different version of mongod, v4.4.0 return err and v4.0.19 return nil
439+
//var res6 []int32
440+
//err = cli.Find(context.Background(), filter2).Distinct("", &res6)
441+
//ast.Error(err) // (Location40352) FieldPath cannot be constructed with empty string
442+
//ast.Equal(0, len(res6))
443443

444444
var res7 []int32
445445
filter3 := 1

0 commit comments

Comments
 (0)