mirror of
https://github.com/status-im/migrate.git
synced 2025-02-22 16:08:04 +00:00
Fix issues with new version of MongoDB driver:
- "connect=single" option is no longer supported - "connect=direct" is the equivalent - https://jira.mongodb.org/browse/GODRIVER-665 - Count() needs to be passed a non-nil filter/document - https://jira.mongodb.org/browse/GODRIVER-572
This commit is contained in:
parent
4fba554b47
commit
5e004dbef4
@ -37,7 +37,7 @@ var (
|
||||
func mongoConnectionString(host, port string) string {
|
||||
// there is connect option for excluding serverConnection algorithm
|
||||
// it's let avoid errors with mongo replica set connection in docker container
|
||||
return fmt.Sprintf("mongodb://%s:%s/testMigration?connect=single", host, port)
|
||||
return fmt.Sprintf("mongodb://%s:%s/testMigration?connect=direct", host, port)
|
||||
}
|
||||
|
||||
func isReady(ctx context.Context, c dktest.ContainerInfo) bool {
|
||||
@ -265,7 +265,7 @@ func TestTransaction(t *testing.T) {
|
||||
t.Fatalf("%v", runErr)
|
||||
}
|
||||
}
|
||||
documentsCount, err := client.Database("testMigration").Collection("hello").Count(context.TODO(), nil)
|
||||
documentsCount, err := client.Database("testMigration").Collection("hello").Count(context.TODO(), bson.M{})
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user