diff options
author | Dan Pasette <dan@10gen.com> | 2015-07-28 11:31:58 -0400 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2015-07-28 18:11:47 -0400 |
commit | d38fb5cbcdb1564dee5a4c015ecdb597beb5364a (patch) | |
tree | 7f71ad116247330d21f5b83c3823e4d736934b42 /jstests/core/doc_validation_options.js | |
parent | ca69a104b4674114471020bc1ff2a4a06542aa4f (diff) | |
download | mongo-d38fb5cbcdb1564dee5a4c015ecdb597beb5364a.tar.gz |
SERVER-19528 Change validationState to validationAction
This reinstates 1264122b4fd9d05a9d38ec87e066f5f614fb2bc3
with a compile fix for windows
Diffstat (limited to 'jstests/core/doc_validation_options.js')
-rw-r--r-- | jstests/core/doc_validation_options.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/core/doc_validation_options.js b/jstests/core/doc_validation_options.js index 6057aaf0c10..cfc9263d376 100644 --- a/jstests/core/doc_validation_options.js +++ b/jstests/core/doc_validation_options.js @@ -23,7 +23,7 @@ // check we can do a bad update in warn mode assert.commandWorked(t.runCommand("collMod", - {validationState: "warn"})); + {validationAction: "warn"})); t.update({}, {$set: {a:2}}); assert.eq(1, t.find({a:2}).itcount()); @@ -31,11 +31,11 @@ // make sure persisted var info = db.getCollectionInfos({name: t.getName()})[0]; - assert.eq("warn", info.options.validationState, tojson(info)); + assert.eq("warn", info.options.validationAction, tojson(info)); // check we can go back to enforce strict assert.commandWorked(t.runCommand("collMod", - {validationState: "enforce", + {validationAction: "error", validationLevel: "strict"})); assertFailsValidation(t.update({}, {$set: {a:3}})); assert.eq(1, t.find({a:2}).itcount()); @@ -50,7 +50,7 @@ t.drop(); assert.commandWorked(db.createCollection(t.getName(), {validator: {a : 1}, - validationState: "warn"})); + validationAction: "warn"})); t.insert({a:2}); t.insert({a:1}); |