We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59de79c commit 0dea2b9Copy full SHA for 0dea2b9
internal/verifier/integration_test_suite.go
@@ -98,7 +98,7 @@ func (suite *IntegrationTestSuite) SetupTest() {
98
dbNames, err := client.ListDatabaseNames(ctx, bson.D{})
99
suite.Require().NoError(err, "should list database names")
100
for _, dbName := range dbNames {
101
- if strings.Index(dbName, suite.DBNameForTest()) == 0 {
+ if strings.HasPrefix(dbName, suite.DBNameForTest()) {
102
suite.T().Logf("Dropping database %#q because it seems to be left over from an earlier run of this test.", dbName)
103
suite.Require().NoError(client.Database(dbName).Drop(ctx))
104
}
0 commit comments