summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/apitest_db.js1
-rw-r--r--jstests/apitest_dbcollection.js1
-rw-r--r--jstests/auth.js1
-rw-r--r--jstests/basic1.js1
-rw-r--r--jstests/basic2.js1
-rw-r--r--jstests/basic3.js1
-rw-r--r--jstests/basic4.js1
-rw-r--r--jstests/basic5.js1
-rw-r--r--jstests/basic6.js1
-rw-r--r--jstests/basic7.js1
-rw-r--r--jstests/capped.js1
-rw-r--r--jstests/capped2.js1
-rw-r--r--jstests/cursor2.js1
-rw-r--r--jstests/cursor3.js1
-rw-r--r--jstests/cursor4.js1
-rw-r--r--jstests/cursor5.js1
-rw-r--r--jstests/cursor6.js1
-rw-r--r--jstests/cursor7.js1
-rw-r--r--jstests/error1.js1
-rw-r--r--jstests/find1.js1
-rw-r--r--jstests/find2.js3
-rw-r--r--jstests/find3.js1
-rw-r--r--jstests/index1.js1
-rw-r--r--jstests/index2.js3
-rw-r--r--jstests/index3.js1
-rw-r--r--jstests/index4.js1
-rw-r--r--jstests/index5.js1
-rw-r--r--jstests/index6.js1
-rw-r--r--jstests/index7.js1
-rw-r--r--jstests/index_check1.js3
-rw-r--r--jstests/jni1.js3
-rw-r--r--jstests/jni2.js1
-rw-r--r--jstests/jni3.js1
-rw-r--r--jstests/jni4.js1
-rw-r--r--jstests/jni7.js1
-rw-r--r--jstests/jni8.js3
-rw-r--r--jstests/jni9.js1
-rw-r--r--jstests/objid1.js1
-rw-r--r--jstests/objid2.js1
-rw-r--r--jstests/objid3.js1
-rw-r--r--jstests/remove.js1
-rw-r--r--jstests/remove2.js1
-rw-r--r--jstests/remove4.js1
-rw-r--r--jstests/sort1.js1
-rw-r--r--jstests/sort2.js1
-rw-r--r--jstests/sort3.js1
-rw-r--r--jstests/sort_numeric.js1
-rw-r--r--jstests/uniqueness.js1
-rw-r--r--jstests/update.js1
-rw-r--r--jstests/update2.js3
50 files changed, 6 insertions, 56 deletions
diff --git a/jstests/apitest_db.js b/jstests/apitest_db.js
index 1fb806387ff..01657035c20 100644
--- a/jstests/apitest_db.js
+++ b/jstests/apitest_db.js
@@ -8,7 +8,6 @@ dd = function( x ){
dd( "a" );
-db = connect( "test" )
dd( "b" );
diff --git a/jstests/apitest_dbcollection.js b/jstests/apitest_dbcollection.js
index 312c4e7f493..00def92c426 100644
--- a/jstests/apitest_dbcollection.js
+++ b/jstests/apitest_dbcollection.js
@@ -2,7 +2,6 @@
* Tests for the db collection
*/
-db = connect( "test" )
/*
diff --git a/jstests/auth.js b/jstests/auth.js
index 1ccae5346ad..67687805740 100644
--- a/jstests/auth.js
+++ b/jstests/auth.js
@@ -1,5 +1,4 @@
-db = connect( "test" )
users = db.getCollection( "system.users" );
users.remove( {} );
diff --git a/jstests/basic1.js b/jstests/basic1.js
index 749126152de..657eb05b1d6 100644
--- a/jstests/basic1.js
+++ b/jstests/basic1.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.getCollection( "basic1" );
assert( t.drop() );
diff --git a/jstests/basic2.js b/jstests/basic2.js
index 87e9ca7bd41..aaa3de4366e 100644
--- a/jstests/basic2.js
+++ b/jstests/basic2.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.getCollection( "basic2" );
t.drop();
diff --git a/jstests/basic3.js b/jstests/basic3.js
index b3afb147a54..5be2b71ad95 100644
--- a/jstests/basic3.js
+++ b/jstests/basic3.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.getCollection( "foo" );
t.find( { "a.b" : 1 } ).toArray();
diff --git a/jstests/basic4.js b/jstests/basic4.js
index 2e427f64f77..0cf7a261e63 100644
--- a/jstests/basic4.js
+++ b/jstests/basic4.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.getCollection( "basic4" );
t.drop();
diff --git a/jstests/basic5.js b/jstests/basic5.js
index e2c742ad2a8..bfa40fb8f5e 100644
--- a/jstests/basic5.js
+++ b/jstests/basic5.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.getCollection( "basic5" );
t.drop();
diff --git a/jstests/basic6.js b/jstests/basic6.js
index 061939941fc..e0cd6f1586e 100644
--- a/jstests/basic6.js
+++ b/jstests/basic6.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.basic6;
t.findOne();
diff --git a/jstests/basic7.js b/jstests/basic7.js
index f3a64684007..7bb0d470e82 100644
--- a/jstests/basic7.js
+++ b/jstests/basic7.js
@@ -1,5 +1,4 @@
-db = connect( "test" )
t = db.basic7;
t.drop();
diff --git a/jstests/capped.js b/jstests/capped.js
index 8bc91c86788..f924035f27b 100644
--- a/jstests/capped.js
+++ b/jstests/capped.js
@@ -1,4 +1,3 @@
-db=connect("test");
db.capped.drop();
db.createCollection("cptest", {capped:true, size:30000});
t = db.cptest;
diff --git a/jstests/capped2.js b/jstests/capped2.js
index be9b1e1d5f1..5cc33a04705 100644
--- a/jstests/capped2.js
+++ b/jstests/capped2.js
@@ -1,4 +1,3 @@
-db=connect("test");
db.capped2.drop();
db._dbCommand( { create: "capped2", capped: true, size: 1000, $nExtents: 11 } );
t = db.capped2;
diff --git a/jstests/cursor2.js b/jstests/cursor2.js
index 852282e99ca..ecafa59c75d 100644
--- a/jstests/cursor2.js
+++ b/jstests/cursor2.js
@@ -25,5 +25,4 @@ function testCursorCountVsArrLen(dbConn) {
}
-db = connect("test")
testCursorCountVsArrLen(db);
diff --git a/jstests/cursor3.js b/jstests/cursor3.js
index 53ec9a459e1..ebfc68c35bd 100644
--- a/jstests/cursor3.js
+++ b/jstests/cursor3.js
@@ -31,5 +31,4 @@ function testConstrainedFindWithOrdering( db ) {
checkResults( [ 1, 0 ], r.find( { a: { $lte: 1 } } ).sort( { a: -1 } ) );
}
-db = connect( "test" );
testConstrainedFindWithOrdering( db );
diff --git a/jstests/cursor4.js b/jstests/cursor4.js
index 1825ca20c7a..2f5a828dd67 100644
--- a/jstests/cursor4.js
+++ b/jstests/cursor4.js
@@ -44,5 +44,4 @@ function testConstrainedFindMultiFieldSorting( db ) {
checkResults( reverseEntries.slice( 1, 4 ), r.find( { a: { $lt: 2 }, b: { $gt: 0 } } ).sort( { a: -1, b: -1 } ) );
}
-db = connect( "test" );
testConstrainedFindMultiFieldSorting( db );
diff --git a/jstests/cursor5.js b/jstests/cursor5.js
index 980cf8da735..8c13b64f5b5 100644
--- a/jstests/cursor5.js
+++ b/jstests/cursor5.js
@@ -33,5 +33,4 @@ function testBoundsWithSubobjectIndexes( db ) {
checkResults( [ z[ 3 ], z[ 1 ] ], r.find( { e: { $gt: 4 }, "a.b": 1 } ).sort( rIdx ) );
}
-db = connect( "test" );
testBoundsWithSubobjectIndexes( db );
diff --git a/jstests/cursor6.js b/jstests/cursor6.js
index 2150520afce..30789a0f373 100644
--- a/jstests/cursor6.js
+++ b/jstests/cursor6.js
@@ -68,7 +68,6 @@ function check( indexed ) {
eq( z[ 0 ], f[ 3 ] );
}
-db = connect( "test" );
db.setProfilingLevel( 1 );
r = db.ed_db_cursor6;
r.drop();
diff --git a/jstests/cursor7.js b/jstests/cursor7.js
index 327367225c6..2b621d4dcd1 100644
--- a/jstests/cursor7.js
+++ b/jstests/cursor7.js
@@ -39,5 +39,4 @@ function testMultipleInequalities( db ) {
checkResults( [ z[ 2 ], z[ 1 ] ], r.find( { a: { $gte: 1, $lte: 7, $gt: 2, $lt: 6 }, b: { $gte: 2, $lte: 8, $gt: 3, $lt: 7 } } ).sort( rIdx ) );
}
-db = connect( "test" );
testMultipleInequalities( db );
diff --git a/jstests/error1.js b/jstests/error1.js
index 9f3dd66f4d7..9fd7acea00d 100644
--- a/jstests/error1.js
+++ b/jstests/error1.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
// test 1
db.$cmd.findOne({reseterror:1});
diff --git a/jstests/find1.js b/jstests/find1.js
index 140406c6b15..5b4ca889e10 100644
--- a/jstests/find1.js
+++ b/jstests/find1.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.find1;
t.drop();
diff --git a/jstests/find2.js b/jstests/find2.js
index 391bdb4988d..f72203419bc 100644
--- a/jstests/find2.js
+++ b/jstests/find2.js
@@ -13,5 +13,4 @@ function testObjectIdFind( db ) {
assert( f[ 1 ]._id < f[ 2 ]._id );
}
-db = connect( "test" );
-testObjectIdFind( db ); \ No newline at end of file
+testObjectIdFind( db );
diff --git a/jstests/find3.js b/jstests/find3.js
index 580f8f768ad..a5e4b7a4d66 100644
--- a/jstests/find3.js
+++ b/jstests/find3.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.find3;
t.drop();
diff --git a/jstests/index1.js b/jstests/index1.js
index 4a597f0a1ac..620f8bb017b 100644
--- a/jstests/index1.js
+++ b/jstests/index1.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.embeddedIndexTest;
t.remove( {} );
diff --git a/jstests/index2.js b/jstests/index2.js
index b2db3ad08ed..b54abcaa792 100644
--- a/jstests/index2.js
+++ b/jstests/index2.js
@@ -1,7 +1,6 @@
/* test indexing where the key is an embedded object.
*/
-db = connect( "test" );
t = db.embeddedIndexTest2;
t.drop();
@@ -38,4 +37,4 @@ assert( t.find({z:{a:18}}).length() == 1 );
assert( t.find().sort( { z : 1 } ).length() == 4 );
assert( t.find().sort( { z : -1 } ).length() == 4 );
-assert(t.validate().valid); \ No newline at end of file
+assert(t.validate().valid);
diff --git a/jstests/index3.js b/jstests/index3.js
index fc63656acf3..39c44f25056 100644
--- a/jstests/index3.js
+++ b/jstests/index3.js
@@ -1,5 +1,4 @@
-db = connect( "foo");
t = db.index3;
t.dropIndexes();
diff --git a/jstests/index4.js b/jstests/index4.js
index 72366100a6d..86a5ccffca3 100644
--- a/jstests/index4.js
+++ b/jstests/index4.js
@@ -1,6 +1,5 @@
// index4.js
-//db = connect( "test" );
t = db.index4;
t.drop();
diff --git a/jstests/index5.js b/jstests/index5.js
index d8e4a92cca9..841ac12ed45 100644
--- a/jstests/index5.js
+++ b/jstests/index5.js
@@ -12,7 +12,6 @@ function validate() {
assert.eq( 1, r[ 1 ].a );
}
-db = connect( "test" );
t = db.index5;
t.drop();
diff --git a/jstests/index6.js b/jstests/index6.js
index 2062f3f2100..7514aca1eab 100644
--- a/jstests/index6.js
+++ b/jstests/index6.js
@@ -1,6 +1,5 @@
// index6.js Test indexes on array subelements.
-db = connect( "test" );
r = db.ed.db.index5;
r.drop();
diff --git a/jstests/index7.js b/jstests/index7.js
index 463aef521bd..7bd46a82568 100644
--- a/jstests/index7.js
+++ b/jstests/index7.js
@@ -25,7 +25,6 @@ function both( k, q ) {
end( k, q );
}
-db = connect( "test" );
f = db.ed_db_index7;
f.drop();
diff --git a/jstests/index_check1.js b/jstests/index_check1.js
index c1ed3f1f472..a33e062a828 100644
--- a/jstests/index_check1.js
+++ b/jstests/index_check1.js
@@ -1,4 +1,3 @@
-db = connect("ed_db_index_check1");
db.somecollection.drop();
@@ -24,4 +23,4 @@ db.somecollection.ensureIndex({a:1});
assert(db.system.namespaces.find({name:/somecollection/}).length() == 2);
-assert(db.somecollection.validate().valid); \ No newline at end of file
+assert(db.somecollection.validate().valid);
diff --git a/jstests/jni1.js b/jstests/jni1.js
index b12974ee48b..9e33287a709 100644
--- a/jstests/jni1.js
+++ b/jstests/jni1.js
@@ -1,6 +1,5 @@
-db = connect( "foo" );
t = db.jni1;
t.remove( {} );
@@ -10,4 +9,4 @@ assert( 2 == t.find().length() );
assert( 2 == t.find( { $where : function(){ return 1; } } ).length() );
assert( 1 == t.find( { $where : function(){ return obj.z == 2; } } ).length() );
-assert(t.validate().valid); \ No newline at end of file
+assert(t.validate().valid);
diff --git a/jstests/jni2.js b/jstests/jni2.js
index 150c04ad6a0..b43d69a7749 100644
--- a/jstests/jni2.js
+++ b/jstests/jni2.js
@@ -1,5 +1,4 @@
-db = connect( "foo" );
t = db.jni2;
t.remove( {} );
diff --git a/jstests/jni3.js b/jstests/jni3.js
index ab0cdc00918..15eb0fa1252 100644
--- a/jstests/jni3.js
+++ b/jstests/jni3.js
@@ -1,5 +1,4 @@
-db = connect( "foo");
t = db.jni3;
for( z = 0; z < 2; z++ ) {
diff --git a/jstests/jni4.js b/jstests/jni4.js
index 948eb881c7e..47b8c46d7de 100644
--- a/jstests/jni4.js
+++ b/jstests/jni4.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.jni4;
t.drop();
diff --git a/jstests/jni7.js b/jstests/jni7.js
index b3187d08429..2685dce08dc 100644
--- a/jstests/jni7.js
+++ b/jstests/jni7.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.jni7;
t.drop();
diff --git a/jstests/jni8.js b/jstests/jni8.js
index fe3e8a08ccf..229872464a1 100644
--- a/jstests/jni8.js
+++ b/jstests/jni8.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.jni8;
t.drop();
@@ -10,4 +9,4 @@ assert.eq( 1 , t.find( function(){ return this.b[0] == 2; } ).length() );
assert.eq( 0 , t.find( function(){ return this.b[0] == 3; } ).length() );
assert.eq( 1 , t.find( function(){ return this.b[1] == 3; } ).length() );
-assert(t.validate().valid); \ No newline at end of file
+assert(t.validate().valid);
diff --git a/jstests/jni9.js b/jstests/jni9.js
index 73501a00aac..940e36a28fc 100644
--- a/jstests/jni9.js
+++ b/jstests/jni9.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
c = db.jni9;
c.drop();
diff --git a/jstests/objid1.js b/jstests/objid1.js
index 0bd8e1c2517..99a7aeb1a6f 100644
--- a/jstests/objid1.js
+++ b/jstests/objid1.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.objid1;
t.drop();
diff --git a/jstests/objid2.js b/jstests/objid2.js
index 7e4f4638a9d..a28c18fca15 100644
--- a/jstests/objid2.js
+++ b/jstests/objid2.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.objid2;
t.drop();
diff --git a/jstests/objid3.js b/jstests/objid3.js
index ac9285dd3f5..02702e60b5c 100644
--- a/jstests/objid3.js
+++ b/jstests/objid3.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.objid3;
t.drop();
diff --git a/jstests/remove.js b/jstests/remove.js
index fd72522ebab..bec015cc679 100644
--- a/jstests/remove.js
+++ b/jstests/remove.js
@@ -1,7 +1,6 @@
// remove.js
// unit test for db remove
-db = connect( "test" );
t = db.removetest;
function f(n,dir) {
diff --git a/jstests/remove2.js b/jstests/remove2.js
index 6e7aa0c4f36..155eb62b5bc 100644
--- a/jstests/remove2.js
+++ b/jstests/remove2.js
@@ -1,7 +1,6 @@
// remove2.js
// a unit test for db remove
-db = connect( "test" );
t = db.removetest2;
function f() {
diff --git a/jstests/remove4.js b/jstests/remove4.js
index 5b73fdd4af7..bd007ed4d27 100644
--- a/jstests/remove4.js
+++ b/jstests/remove4.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
t = db.remove4;
t.drop();
diff --git a/jstests/sort1.js b/jstests/sort1.js
index ed6424dbd9b..2b3d72d02dd 100644
--- a/jstests/sort1.js
+++ b/jstests/sort1.js
@@ -1,6 +1,5 @@
// test sorting, mainly a test ver simple with no index
-db = connect( "test" );
t = db.sorrrt;
t.drop();
diff --git a/jstests/sort2.js b/jstests/sort2.js
index a50c12d1a11..facd64c18de 100644
--- a/jstests/sort2.js
+++ b/jstests/sort2.js
@@ -1,6 +1,5 @@
// test sorting, mainly a test ver simple with no index
-db = connect( "test" );
t = db.sorrrt2;
t.drop();
diff --git a/jstests/sort3.js b/jstests/sort3.js
index 00c4d197b68..b79f1f60381 100644
--- a/jstests/sort3.js
+++ b/jstests/sort3.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.sort3;
t.drop();
diff --git a/jstests/sort_numeric.js b/jstests/sort_numeric.js
index 86e3b671cc5..807f23dfe8d 100644
--- a/jstests/sort_numeric.js
+++ b/jstests/sort_numeric.js
@@ -1,5 +1,4 @@
-db = connect( "test" );
t = db.sort_numeric;
t.drop();
diff --git a/jstests/uniqueness.js b/jstests/uniqueness.js
index 6cda7df2bbe..84938fa41e7 100644
--- a/jstests/uniqueness.js
+++ b/jstests/uniqueness.js
@@ -1,4 +1,3 @@
-//db=connect("192.168.58.1/test", u , p);
t = db.foo;
diff --git a/jstests/update.js b/jstests/update.js
index fa34f607350..70f9f153c00 100644
--- a/jstests/update.js
+++ b/jstests/update.js
@@ -1,4 +1,3 @@
-db = connect("ed_db_update");
asdf = db.getCollection( "asdf" );
diff --git a/jstests/update2.js b/jstests/update2.js
index fec76eed427..ff9783348d4 100644
--- a/jstests/update2.js
+++ b/jstests/update2.js
@@ -1,4 +1,3 @@
-db = connect( "test" );
f = db.ed_db_update2;
f.drop();
@@ -16,4 +15,4 @@ assert.eq( 4, f.findOne().a );
f.drop();
f.save( { a: 4 } );
f.update( { a: 4 }, { $inc: { a: 2 } } );
-assert.eq( 6, f.findOne().a ); \ No newline at end of file
+assert.eq( 6, f.findOne().a );