summaryrefslogtreecommitdiff
path: root/jstests/indexi.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/indexi.js')
-rw-r--r--jstests/indexi.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/jstests/indexi.js b/jstests/indexi.js
deleted file mode 100644
index 446d6a21fc5..00000000000
--- a/jstests/indexi.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Test that client cannot access index namespaces SERVER-4276.
-
-if ( 0 ) { // SERVER-4276
-
-t = db.jstests_indexi;
-t.drop();
-
-debug = true;
-
-idx = db.jstests_indexi.$_id_;
-
-function shouldFail( f ) {
- e = assert.throws( function() {
- f();
- if( db.getLastError() ) {
- throw db.getLastError();
- }
- } );
- if ( debug ) {
- printjson( e );
- }
-}
-
-function checkFailingOperations() {
- // Test that accessing the index namespace fails.
- shouldFail( function() { idx.count(); } );
- shouldFail( function() { idx.find().itcount(); } );
- shouldFail( function() { idx.insert({}); } );
- shouldFail( function() { idx.remove({}); } );
- shouldFail( function() { idx.update({},{}); } );
- assert.commandFailed( idx.runCommand( 'compact' ) );
-
- // No validation here (yet).
- //shouldFail( function() { idx.ensureIndex({x:1}) } );
-}
-
-// Check with base collection not present.
-checkFailingOperations();
-t.save({});
-// Check with base collection present.
-checkFailingOperations();
-
-}