Skip to content

Commit 25c8a49

Browse files
author
Andy Schwerin
committed
SERVER-7428 Regression test.
1 parent 736bcf0 commit 25c8a49

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

jstests/slowNightly/server7428.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Regression test for SERVER-7428.
2+
//
3+
// Verify that the copyDatabase command works appropriately when the
4+
// target mongo instance has authentication enabled.
5+
6+
// Setup fromDb with no auth
7+
var fromDb = MongoRunner.runMongod({ port: 29000 });
8+
9+
// Setup toDb with auth
10+
var toDb = MongoRunner.runMongod({auth : "", port : 31001});
11+
var admin = toDb.getDB("admin");
12+
admin.addUser("foo","bar");
13+
admin.auth("foo","bar");
14+
15+
admin.copyDatabase('test', 'test', fromDb.host)
16+

0 commit comments

Comments
 (0)