Skip to content

Commit 8f32bf7

Browse files
committed
minor: make sure test database names are unique
1 parent 3a64b66 commit 8f32bf7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/mongo/integration/replica_set/basic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace {
2727
using namespace mongo;
2828
using namespace mongo::integration;
2929

30-
const string TEST_NS = "test.basic";
31-
const string TEST_DB = "test";
30+
const string TEST_NS = "test-basic.basic";
31+
const string TEST_DB = "test-basic";
3232
const string TEST_COLL = "basic";
3333

3434
class RSBasicTest : public ReplicaSetTest {

src/mongo/integration/replica_set/read_preference.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace {
2727
using namespace mongo;
2828
using namespace mongo::integration;
2929

30-
const string TEST_NS = "test.read_pref";
31-
const string TEST_DB = "test";
30+
const string TEST_NS = "test-read_pref.read_pref";
31+
const string TEST_DB = "test-read_pref";
3232
const string TEST_COLL = "read_pref";
3333

3434
class ReadPreferenceTest : public ReplicaSetTest {

src/mongo/integration/standalone/bulk_operation_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ namespace {
3232
using namespace mongo;
3333
using namespace mongo::integration;
3434

35-
const string TEST_DB = "test";
35+
const string TEST_DB = "test-bulk_operation";
3636
const string TEST_COLL = "bulk_operation";
37-
const string TEST_NS = "test.bulk_operation";
37+
const string TEST_NS = "test-bulk_operation.bulk_operation";
3838

3939
template <typename T>
4040
struct RequiredWireVersion;

src/mongo/integration/standalone/dbclient_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ using namespace mongo;
4343
using namespace mongo::integration;
4444

4545
namespace {
46-
const string TEST_NS = "test.dbclient";
47-
const string TEST_DB = "test";
46+
const string TEST_NS = "test-dbclient.dbclient";
47+
const string TEST_DB = "test-dbclient";
4848
const string TEST_COLL = "dbclient";
4949

5050
class DBClientTest : public StandaloneTest {
@@ -984,7 +984,7 @@ namespace {
984984
if (kCompiledWithSSL) {
985985
createUser(c, TEST_DB, "jane", "pwd");
986986
std::string errmsg;
987-
ASSERT_TRUE(c.auth("test", "jane", "pwd", errmsg));
987+
ASSERT_TRUE(c.auth(TEST_DB, "jane", "pwd", errmsg));
988988

989989
c.dropDatabase("copy");
990990
c.insert(TEST_NS, BSON("flavor" << "vanilla"));
@@ -1431,7 +1431,7 @@ namespace {
14311431
if (serverGTE(&c, 2, 4) && (!serverGTE(&c, 2, 7) || kCompiledWithSSL)) {
14321432
createUser(c, TEST_DB, "user2", "password2");
14331433
std::string errmsg;
1434-
ASSERT_TRUE(c.auth("test", "user2", "password2", errmsg));
1434+
ASSERT_TRUE(c.auth(TEST_DB, "user2", "password2", errmsg));
14351435
}
14361436
}
14371437

@@ -1440,7 +1440,7 @@ namespace {
14401440
if (serverGTE(&c, 2, 4) && (!serverGTE(&c, 2, 7) || kCompiledWithSSL)) {
14411441
createUser(c, TEST_DB, "user3", "password3");
14421442
std::string errmsg;
1443-
ASSERT_FALSE(c.auth("test", "user3", "notPassword3", errmsg));
1443+
ASSERT_FALSE(c.auth(TEST_DB, "user3", "notPassword3", errmsg));
14441444
}
14451445
}
14461446

0 commit comments

Comments
 (0)