2009-02-06 20:26:56 +01:00
|
|
|
var baseName = "jstests_dbNoCreate";
|
|
|
|
|
|
|
|
var m = startMongod( "--port", "27018", "--dbpath", "/data/db/" + baseName );
|
|
|
|
|
|
|
|
var t = m.getDB( baseName ).t;
|
|
|
|
|
|
|
|
var no = function( dbName ) {
|
|
|
|
assert.eq( -1, db.getMongo().getDBNames().indexOf( dbName ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
assert.eq( 0, t.find().toArray().length );
|
|
|
|
t.remove();
|
|
|
|
t.update( {}, { a:1 } );
|
|
|
|
t.drop();
|
|
|
|
|
|
|
|
stopMongod( 27018 );
|
|
|
|
|
2009-02-14 15:15:05 +01:00
|
|
|
var m = startMongoProgram( "mongod", "--port", "27018", "--dbpath", "/data/db/" + baseName );
|
2009-02-06 20:26:56 +01:00
|
|
|
assert.eq( -1, m.getDBNames().indexOf( baseName ) );
|