0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-27 23:27:11 +01:00
mongodb/jstests/disk/dbNoCreate.js
2023-04-26 19:19:19 +00:00

18 lines
436 B
JavaScript

var baseName = "jstests_dbNoCreate";
var m = MongoRunner.runMongod({});
var t = m.getDB(baseName).t;
assert.eq(0, t.find().toArray().length);
t.remove({});
t.update({}, {a: 1});
t.drop();
MongoRunner.stopMongod(m);
m = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: m.dbpath});
assert.eq(
-1, m.getDBNames().indexOf(baseName), "found " + baseName + " in " + tojson(m.getDBNames()));
MongoRunner.stopMongod(m);