blob: b4c67b77a0f89308cf4020659c1f3636928f182e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/**
* This test is for SERVER-29453: Renaming the admin.system.version collection
* or removing the FCV document should not be allowed.
*/
(function() {
'use strict';
let standalone = MongoRunner.runMongod();
assert.neq(null, standalone, 'mongod was unable to start up');
let adminDB = standalone.getDB('admin');
// Renaming the collection or deleting the document should fail.
assert.commandFailedWithCode(
adminDB.runCommand({renameCollection: 'admin.system.version', to: 'admin.dummy.collection'}),
ErrorCodes.IllegalOperation);
assert.writeErrorWithCode(adminDB.system.version.remove({}), 40670);
MongoRunner.stopMongod(standalone);
})();
|