summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorauto-revert-processor <dev-prod-dag@mongodb.com>2022-01-13 09:18:09 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-13 10:02:45 +0000
commit2739eb4ecd1cf45cb49df48b03e958444c471358 (patch)
treec581877ba86ac79fc4eeb1de3d3542d258064772 /jstests/core
parentf212fff6d910cd717e2a7979ed51687d0fb4832a (diff)
downloadmongo-2739eb4ecd1cf45cb49df48b03e958444c471358.tar.gz
Revert "SERVER-62443 Add `collectionUUID` parameter to `find` command"
This reverts commit eb75b6ccc62f7c8ea26a57c1b5eb96a41809396a.
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/collection_uuid_find.js56
1 files changed, 0 insertions, 56 deletions
diff --git a/jstests/core/collection_uuid_find.js b/jstests/core/collection_uuid_find.js
deleted file mode 100644
index e958bffa890..00000000000
--- a/jstests/core/collection_uuid_find.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Tests the collectionUUID parameter of the find command.
- *
- * @tags: [
- * featureFlagCommandsAcceptCollectionUUID,
- * tenant_migration_incompatible,
- * ]
- */
-(function() {
-'use strict';
-
-const testDB = db.getSiblingDB(jsTestName());
-assert.commandWorked(testDB.dropDatabase());
-
-const coll = testDB['coll'];
-assert.commandWorked(coll.insert({_id: 0}));
-
-const uuid =
- assert.commandWorked(testDB.runCommand({listCollections: 1})).cursor.firstBatch[0].info.uuid;
-
-// The command succeeds when the correct UUID is provided.
-assert.commandWorked(testDB.runCommand({find: coll.getName(), collectionUUID: uuid}));
-
-// The command fails when the provided UUID does not correspond to an existing collection.
-const nonexistentUUID = UUID();
-let res = assert.commandFailedWithCode(
- testDB.runCommand({find: coll.getName(), collectionUUID: nonexistentUUID}),
- ErrorCodes.CollectionUUIDMismatch);
-assert.eq(res.collectionUUID, nonexistentUUID);
-assert.eq(res.actualNamespace, "");
-
-// The command fails when the provided UUID corresponds to a different collection.
-const coll2 = testDB['coll_2'];
-assert.commandWorked(coll2.insert({_id: 1}));
-res = assert.commandFailedWithCode(testDB.runCommand({find: coll2.getName(), collectionUUID: uuid}),
- ErrorCodes.CollectionUUIDMismatch);
-assert.eq(res.collectionUUID, uuid);
-assert.eq(res.actualNamespace, coll.getFullName());
-
-// The command fails when the provided UUID corresponds to a different collection, even if the
-// provided namespace does not exist.
-coll2.drop();
-res = assert.commandFailedWithCode(testDB.runCommand({find: coll2.getName(), collectionUUID: uuid}),
- ErrorCodes.CollectionUUIDMismatch);
-assert.eq(res.collectionUUID, uuid);
-assert.eq(res.actualNamespace, coll.getFullName());
-
-// The command fails when the provided UUID corresponds to a different collection, even if the
-// provided namespace is a view.
-const view = db['view'];
-assert.commandWorked(testDB.createView(view.getName(), coll.getName(), []));
-res = assert.commandFailedWithCode(testDB.runCommand({find: view.getName(), collectionUUID: uuid}),
- ErrorCodes.CollectionUUIDMismatch);
-assert.eq(res.collectionUUID, uuid);
-assert.eq(res.actualNamespace, coll.getFullName());
-})();