Files
mongo/jstests/sharding/drop_config_db.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

19 lines
522 B
JavaScript

/*
* Test that dropping the config DB does not crash the server.
* @tags: [
* disables_test_commands,
* config_shard_incompatible
* ]
*/
TestData.enableTestCommands = false;
const mongod = MongoRunner.runMongod();
const config = mongod.getDB("config");
// Create a collection in config to ensure that it exists before dropping it.
assert.commandWorked(config.runCommand({create: "test"}));
// Dropping the config DB should succeed.
assert.commandWorked(config.dropDatabase());
MongoRunner.stopMongod(mongod);