summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorYuhong Zhang <yuhong.zhang@mongodb.com>2022-11-18 14:38:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-18 15:39:59 +0000
commitefa7a192844170c35d3ce99541ef1ce7f8fab527 (patch)
treec0dbf4320c18b36e195d78b13759c1bd697eb068 /jstests
parentee271f84ba2a46ce6ead81d4be21e075c4ba69ca (diff)
downloadmongo-efa7a192844170c35d3ce99541ef1ce7f8fab527.tar.gz
Revert "SERVER-71226 Skip collections with explicitly set conflicting validators in the background validation hook"
This reverts commit 2ef0ee31539036523136230b93c8e7cbf62a0ddd.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/views/invalid_system_views.js3
-rw-r--r--jstests/hooks/run_validate_collections_background.js25
2 files changed, 1 insertions, 27 deletions
diff --git a/jstests/core/views/invalid_system_views.js b/jstests/core/views/invalid_system_views.js
index 3585f510850..d4151e34513 100644
--- a/jstests/core/views/invalid_system_views.js
+++ b/jstests/core/views/invalid_system_views.js
@@ -113,8 +113,7 @@ function runTest(badViewDefinition) {
}
assert.commandWorked(
- viewsDB.runCommand(
- {collMod: "collection", validator: {x: {$type: "string"}}, validationAction: "warn"}),
+ viewsDB.runCommand({collMod: "collection", validator: {x: {$type: "string"}}}),
makeErrorMessage("collMod"));
const renameCommand = {
diff --git a/jstests/hooks/run_validate_collections_background.js b/jstests/hooks/run_validate_collections_background.js
index 66dda29c6d9..fc5b928d8aa 100644
--- a/jstests/hooks/run_validate_collections_background.js
+++ b/jstests/hooks/run_validate_collections_background.js
@@ -45,28 +45,6 @@ const isIgnorableError = function ignorableError(codeName) {
*/
const validateCollectionsBackgroundThread = function validateCollectionsBackground(
host, isIgnorableErrorFunc) {
- // Some tests explicitly mess with schema validation. We will skip running background validation
- // on those collections.
- const skippedCollections = new Set([
- "collectionWithValidator",
- "jstests_schema_encrypt",
- "json_schema_additional_items",
- "schema_allowed_properties",
- "jstests_schema_bsontype",
- "jstests_schema_dependencies",
- "jstests_schema_encrypt",
- "json_schema_items",
- "jstests_json_schema",
- "jstests_json_schema_logical",
- "json_schema_min_max_items",
- "jstests_schema_min_max_properties",
- "schema_pattern_properties",
- "jstests_schema_required",
- "json_schema_unique_items",
- "json_schema_test_corpus",
- "jstests_json_schema_ignore_unsupported",
- ]);
-
// Calls 'func' with the print() function overridden to be a no-op.
const quietly = (func) => {
const printOriginal = print;
@@ -128,9 +106,6 @@ const validateCollectionsBackgroundThread = function validateCollectionsBackgrou
});
for (let collectionName of collectionNames) {
- if (dbName == "bypass_document_validation" || skippedCollections.has(collectionName)) {
- continue;
- }
let res = conn.getDB(dbName).getCollection(collectionName).runCommand({
"validate": collectionName,
background: true,