summaryrefslogtreecommitdiff
path: root/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/collection_uuid_coll_stats_index_stats.js')
-rw-r--r--jstests/aggregation/collection_uuid_coll_stats_index_stats.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/jstests/aggregation/collection_uuid_coll_stats_index_stats.js b/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
index 67c8ca65113..5aa92524652 100644
--- a/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
+++ b/jstests/aggregation/collection_uuid_coll_stats_index_stats.js
@@ -49,19 +49,10 @@ const testCommand = function(cmd, cmdObj) {
jsTestLog("The command '" + cmd +
"' fails when the provided UUID corresponds to a different collection, even if the " +
"provided namespace does not exist.");
- assert.commandWorked(testDB.runCommand({drop: coll2.getName()}));
+ coll2.drop();
res =
assert.commandFailedWithCode(testDB.runCommand(cmdObj), ErrorCodes.CollectionUUIDMismatch);
validateErrorResponse(res, testDB.getName(), uuid, coll2.getName(), coll.getName());
- assert(!testDB.getCollectionNames().includes(coll2.getName()));
-
- jsTestLog("The command '" + cmd +
- "' fails with CollectionUUIDMismatch even if the database does not exist.");
- const nonexistentDB = testDB.getSiblingDB(testDB.getName() + '_nonexistent');
- cmdObj[cmd] = 'nonexistent';
- res = assert.commandFailedWithCode(nonexistentDB.runCommand(cmdObj),
- ErrorCodes.CollectionUUIDMismatch);
- validateErrorResponse(res, nonexistentDB.getName(), uuid, 'nonexistent', null);
jsTestLog("The command '" + cmd + "' succeeds on view when no UUID is provided.");
const viewName = "view";