Skip to content

Commit b4f45b3

Browse files
committed
account for rs->sc in list-namespaces test
1 parent 47e2ced commit b4f45b3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

internal/verifier/integration_test_suite.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ func (suite *IntegrationTestSuite) TearDownTest() {
134134
}
135135
}
136136

137-
func (suite *IntegrationTestSuite) GetSrcTopology() util.ClusterTopology {
137+
func (suite *IntegrationTestSuite) GetTopology(client *mongo.Client) util.ClusterTopology {
138138
clusterInfo, err := util.GetClusterInfo(
139139
suite.Context(),
140-
suite.srcMongoClient,
140+
client,
141141
)
142142
suite.Require().NoError(err, "should fetch src cluster info")
143143

internal/verifier/migration_verifier_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ func (suite *IntegrationTestSuite) TestVerifierNamespaceList() {
11831183
err = suite.dstMongoClient.Database("testDb4").CreateCollection(ctx, "testColl6")
11841184
suite.Require().NoError(err)
11851185

1186-
if suite.GetSrcTopology() != util.TopologySharded {
1186+
if suite.GetTopology(suite.dstMongoClient) != util.TopologySharded {
11871187
err = suite.dstMongoClient.Database("local").CreateCollection(ctx, "testColl7")
11881188
suite.Require().NoError(err)
11891189
}
@@ -1224,9 +1224,12 @@ func (suite *IntegrationTestSuite) TestVerifierNamespaceList() {
12241224
suite.ElementsMatch([]string{"testDb1.testColl1", "testDb1.testColl2", "testDb1.testView1"}, verifier.dstNamespaces)
12251225

12261226
// Collections in admin, config, and local should not be found
1227-
if suite.GetSrcTopology() != util.TopologySharded {
1227+
if suite.GetTopology(suite.srcMongoClient) != util.TopologySharded {
12281228
err = suite.srcMongoClient.Database("local").CreateCollection(ctx, "islocalSrc")
12291229
suite.Require().NoError(err)
1230+
}
1231+
1232+
if suite.GetTopology(suite.dstMongoClient) != util.TopologySharded {
12301233
err = suite.dstMongoClient.Database("local").CreateCollection(ctx, "islocalDest")
12311234
suite.Require().NoError(err)
12321235
}

0 commit comments

Comments
 (0)