Skip to content

Commit 5799b7c

Browse files
committed
move to drivertest
1 parent efd68a1 commit 5799b7c

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

internal/integration/collection_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"go.mongodb.org/mongo-driver/v2/mongo/options"
2020
"go.mongodb.org/mongo-driver/v2/mongo/writeconcern"
2121
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
22-
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/integration"
22+
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest"
2323
)
2424

2525
const (
@@ -1820,7 +1820,7 @@ func TestCollection(t *testing.T) {
18201820
})
18211821
mt.RunOpts("insert and delete with batches", mtest.NewOptions().ClientType(mtest.Mock), func(mt *mtest.T) {
18221822
// grouped together because delete requires the documents to be inserted
1823-
maxBatchCount := int(integration.MockDescription.MaxBatchCount)
1823+
maxBatchCount := int(drivertest.MockDescription.MaxBatchCount)
18241824
numDocs := maxBatchCount + 50
18251825
var insertModels []mongo.WriteModel
18261826
var deleteModels []mongo.WriteModel
@@ -1871,7 +1871,7 @@ func TestCollection(t *testing.T) {
18711871
assert.True(mt, deletes > 1, "expected multiple batches, got %v", deletes)
18721872
})
18731873
mt.RunOpts("update with batches", mtest.NewOptions().ClientType(mtest.Mock), func(mt *mtest.T) {
1874-
maxBatchCount := int(integration.MockDescription.MaxBatchCount)
1874+
maxBatchCount := int(drivertest.MockDescription.MaxBatchCount)
18751875
numModels := maxBatchCount + 50
18761876
var models []mongo.WriteModel
18771877

internal/integration/mtest/mongotest.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"go.mongodb.org/mongo-driver/v2/mongo/writeconcern"
3030
"go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore"
3131
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
32-
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/integration"
32+
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/drivertest"
3333
)
3434

3535
var (
@@ -63,7 +63,7 @@ type T struct {
6363
createClient *bool
6464
createCollection *bool
6565
runOn []RunOnBlock
66-
mockDeployment *integration.MockDeployment // nil if the test is not being run against a mock
66+
mockDeployment *drivertest.MockDeployment // nil if the test is not being run against a mock
6767
mockResponses []bson.D
6868
createdColls []*Collection // collections created in this test
6969
proxyDialer *proxyDialer
@@ -662,7 +662,7 @@ func (t *T) createTestClient() {
662662

663663
args.PoolMonitor = nil
664664

665-
t.mockDeployment = integration.NewMockDeployment()
665+
t.mockDeployment = drivertest.NewMockDeployment()
666666
args.Deployment = t.mockDeployment
667667

668668
opts := mongoutil.NewOptionsLister(args, nil)

x/mongo/driver/integration/opmsg_deployment.go renamed to x/mongo/driver/drivertest/opmsg_deployment.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// not use this file except in compliance with the License. You may obtain
55
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
66

7-
package integration
7+
package drivertest
88

99
import (
1010
"context"
@@ -18,7 +18,6 @@ import (
1818
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
1919
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/description"
2020
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/mnet"
21-
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology"
2221
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/wiremessage"
2322
)
2423

@@ -41,9 +40,6 @@ var (
4140
MaxBatchCount: maxBatchCount,
4241
SessionTimeoutMinutes: &sessionTimeoutMinutes,
4342
Kind: description.ServerKindRSPrimary,
44-
WireVersion: &description.VersionRange{
45-
Max: topology.SupportedWireVersions.Max,
46-
},
4743
}
4844
)
4945

x/mongo/driver/integration/opmsg_deployment_test.go renamed to x/mongo/driver/drivertest/opmsg_deployment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// not use this file except in compliance with the License. You may obtain
55
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
66

7-
package integration
7+
package drivertest
88

99
import (
1010
"context"

0 commit comments

Comments
 (0)