Skip to content

Commit 4ba0eda

Browse files
committed
fix
1 parent cc34be4 commit 4ba0eda

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

internal/verifier/change_stream_test.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ package verifier
33
import (
44
"context"
55
"strings"
6-
"testing"
76
"time"
87

98
"github.com/10gen/migration-verifier/internal/testutil"
109
"github.com/10gen/migration-verifier/internal/util"
1110
"github.com/10gen/migration-verifier/mslices"
1211
"github.com/pkg/errors"
1312
"github.com/samber/lo"
14-
"github.com/stretchr/testify/assert"
1513
"github.com/stretchr/testify/require"
1614
"go.mongodb.org/mongo-driver/bson"
1715
"go.mongodb.org/mongo-driver/bson/primitive"
@@ -20,20 +18,16 @@ import (
2018
"go.mongodb.org/mongo-driver/mongo/readconcern"
2119
)
2220

23-
func TestChangeStreamFilter(t *testing.T) {
24-
verifier := Verifier{
25-
nsMap: NewNSMap(),
26-
}
27-
verifier.SetMetaDBName("metadb")
28-
verifier.initializeChangeStreamReaders()
29-
assert.Contains(t,
21+
func (suite *IntegrationTestSuite) TestChangeStreamFilter() {
22+
verifier := suite.BuildVerifier()
23+
suite.Assert().Contains(
3024
verifier.srcChangeStreamReader.GetChangeStreamFilter(),
3125
bson.D{
32-
{"$match", bson.D{{"ns.db", bson.D{{"$ne", "metadb"}}}}},
26+
{"$match", bson.D{{"ns.db", bson.D{{"$ne", metaDBName}}}}},
3327
},
3428
)
3529
verifier.srcChangeStreamReader.namespaces = []string{"foo.bar", "foo.baz", "test.car", "test.chaz"}
36-
assert.Contains(t,
30+
suite.Assert().Contains(
3731
verifier.srcChangeStreamReader.GetChangeStreamFilter(),
3832
bson.D{{"$match", bson.D{
3933
{"$or", []bson.D{

internal/verifier/migration_verifier_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ func (suite *IntegrationTestSuite) TestGenerationalRechecking() {
13871387
// wait for generation to finish
13881388
suite.Require().NoError(runner.AwaitGenerationEnd())
13891389
status = waitForTasks()
1390-
// there should be no failures now, since they are are equivalent at this point in time
1390+
// there should be no failures now, since they are equivalent at this point in time
13911391
suite.Require().Equal(VerificationStatus{TotalTasks: 1, CompletedTasks: 1}, *status)
13921392

13931393
// now insert in the source, this should come up next generation
@@ -1415,7 +1415,7 @@ func (suite *IntegrationTestSuite) TestGenerationalRechecking() {
14151415
suite.Require().NoError(runner.AwaitGenerationEnd())
14161416
status = waitForTasks()
14171417

1418-
// there should be no failures now, since they are are equivalent at this point in time
1418+
// there should be no failures now, since they are equivalent at this point in time
14191419
suite.Assert().Equal(VerificationStatus{TotalTasks: 1, CompletedTasks: 1}, *status)
14201420

14211421
// We could just abandon this verifier, but we might as well shut it down
@@ -1613,6 +1613,7 @@ func (suite *IntegrationTestSuite) TestPartitionWithFilter() {
16131613
// Set up the verifier for testing.
16141614
verifier := suite.BuildVerifier()
16151615
verifier.SetSrcNamespaces([]string{dbname + ".testColl1"})
1616+
verifier.SetDstNamespaces([]string{dbname + ".testColl1"})
16161617
verifier.SetNamespaceMap()
16171618
verifier.globalFilter = filter
16181619
// Use a small partition size so that we can test creating multiple partitions.

0 commit comments

Comments
 (0)