summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2013-04-18 13:55:26 -0400
committerEric Milkie <milkie@10gen.com>2013-04-18 13:55:26 -0400
commit52c1e65d6fd86c84a116650ab072899a65585b7f (patch)
tree5a624eade20787e151dca5fe72d1324fbda52c3b
parent0239789a5b1ef3057673288cb024e8ec286dbde3 (diff)
downloadmongo-52c1e65d6fd86c84a116650ab072899a65585b7f.tar.gz
SERVER-9093 remove unit test in 2.4 branch (needs SERVER-8420)
-rw-r--r--jstests/sharding/auth_copydb.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/jstests/sharding/auth_copydb.js b/jstests/sharding/auth_copydb.js
deleted file mode 100644
index 23be714127b..00000000000
--- a/jstests/sharding/auth_copydb.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Tests the copydb command on mongos with auth
-
-
-var st = new ShardingTest({ shards : 1,
- mongos : 1,
- keyFile : "jstests/libs/key1"});
-var mongos = st.s0;
-var destAdminDB = mongos.getDB('admin');
-var destTestDB = mongos.getDB('test');
-
-var sourceMongodConn = MongoRunner.runMongod({});
-var sourceTestDB = sourceMongodConn.getDB('test');
-
-sourceTestDB.foo.insert({a:1});
-
-destAdminDB.addUser('admin', 'password'); // Turns on access control enforcement
-
-jsTestLog("Running copydb that should fail");
-var res = destAdminDB.runCommand({copydb:1,
- fromhost: sourceMongodConn.host,
- fromdb:'test',
- todb:'test'});
-printjson(res);
-assert.commandFailed(res);
-
-destAdminDB.auth('admin', 'password');
-assert.eq(0, destTestDB.foo.count()); // Be extra sure the copydb didn't secretly succeed.
-
-jsTestLog("Running copydb that should succeed");
-res = destAdminDB.runCommand({copydb:1,
- fromhost: sourceMongodConn.host,
- fromdb:'test',
- todb:'test'});
-printjson(res);
-assert.commandWorked(res);
-
-assert.eq(1, destTestDB.foo.count());
-assert.eq(1, destTestDB.foo.findOne().a);
-
-st.stop();