mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
20 lines
513 B
JavaScript
20 lines
513 B
JavaScript
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 );
|
|
|
|
var m = startMongoProgram( "mongod", "--port", "27018", "--dbpath", "/data/db/" + baseName );
|
|
assert.eq( -1, m.getDBNames().indexOf( baseName ) );
|