diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-10-25 15:03:59 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-10-28 14:57:51 -0400 |
commit | 0e35f9154fe51586d4bbc30267772a664b8df907 (patch) | |
tree | ea957c71863f019d40933c3561e593aac67f24e0 /jstests | |
parent | 38b665b22722ab442a9c022b54558e3cd7a9b84f (diff) | |
download | mongo-0e35f9154fe51586d4bbc30267772a664b8df907.tar.gz |
SERVER-8213 Make copyDB and clone work with auth when using new-style users
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/auth/copyauth.js | 9 | ||||
-rw-r--r-- | jstests/clonecollection.js (renamed from jstests/clone/clonecollection.js) | 0 | ||||
-rw-r--r-- | jstests/server7428.js (renamed from jstests/slowNightly/server7428.js) | 0 | ||||
-rw-r--r-- | jstests/sharding/auth_copydb.js | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/jstests/auth/copyauth.js b/jstests/auth/copyauth.js index 6a46f42574b..2b344309a39 100644 --- a/jstests/auth/copyauth.js +++ b/jstests/auth/copyauth.js @@ -9,9 +9,12 @@ var baseName = "jstests_clone_copyauth"; var source = startMongod( "--auth", "--port", ports[ 0 ], "--dbpath", "/data/db/" + baseName + "_source", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); var target = startMongod( "--port", ports[ 1 ], "--dbpath", "/data/db/" + baseName + "_target", "--nohttpinterface", "--bind_ip", "127.0.0.1", "--smallfiles" ); +source.getDB( "admin" ).addUser( "super", "super" ); +source.getDB( "admin" ).auth( "super", "super" ); source.getDB( baseName )[ baseName ].save( {i:1} ); source.getDB( baseName ).addUser( "foo", "bar" ); -source.getDB( "admin" ).addUser( "super", "super" ); +source.getDB( "admin" ).logout(); + assert.throws( function() { source.getDB( baseName )[ baseName ].findOne(); } ); assert.commandWorked(target.getDB(baseName).copyDatabase(baseName, @@ -61,6 +64,4 @@ assert.eq(1, target.getDB(baseName)[baseName].findOne().i); } -if (0) { // SERVER-8213 - runTest(); -}
\ No newline at end of file +runTest(); diff --git a/jstests/clone/clonecollection.js b/jstests/clonecollection.js index ea5f229085c..ea5f229085c 100644 --- a/jstests/clone/clonecollection.js +++ b/jstests/clonecollection.js diff --git a/jstests/slowNightly/server7428.js b/jstests/server7428.js index 1b28e3fc620..1b28e3fc620 100644 --- a/jstests/slowNightly/server7428.js +++ b/jstests/server7428.js diff --git a/jstests/sharding/auth_copydb.js b/jstests/sharding/auth_copydb.js index 23fea03bdec..bba901967e4 100644 --- a/jstests/sharding/auth_copydb.js +++ b/jstests/sharding/auth_copydb.js @@ -42,6 +42,4 @@ st.stop(); } -if (0) { // SERVER-8213 - runTest(); -}
\ No newline at end of file +runTest(); |