diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-07-31 10:56:56 -0400 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2017-07-31 13:59:59 -0400 |
commit | 9096def9687739a40df79efe4e9e4d9b19215201 (patch) | |
tree | b2f47817d0899e0de7f04bc40e226e8c729d5860 /jstests/auth/authentication_restrictions.js | |
parent | 6d9d554e24b134e9cadad7e9377c5e4634c3a6af (diff) | |
download | mongo-9096def9687739a40df79efe4e9e4d9b19215201.tar.gz |
SERVER-30434: Process authenticationRestrictions in FCV 3.4
Diffstat (limited to 'jstests/auth/authentication_restrictions.js')
-rw-r--r-- | jstests/auth/authentication_restrictions.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jstests/auth/authentication_restrictions.js b/jstests/auth/authentication_restrictions.js index 98c4a1c586a..17d656c9f05 100644 --- a/jstests/auth/authentication_restrictions.js +++ b/jstests/auth/authentication_restrictions.js @@ -194,7 +194,7 @@ eventualDb.getSiblingDB("test").runCommand({find: "foo", batchSize: 0})); print( - "When a client downgrades featureCompatibilityVersion, users with featureCompatibilityVersions become unusable."); + "When a client downgrades featureCompatibilityVersion, authenticationRestrictions are still enforced"); assert.commandWorked(admin.runCommand({ createUser: "user13", pwd: "user", @@ -212,9 +212,12 @@ assert.commandWorked(admin.runCommand({setFeatureCompatibilityVersion: "3.4"})); sleepUntilUserDataRefreshed(); - assert.commandFailed(db.getSiblingDB("test").runCommand({find: "foo", batchSize: 0})); - assert.commandFailed( + assert(db.auth("user13", "user")); + assert.commandWorked(db.getSiblingDB("test").runCommand({find: "foo", batchSize: 0})); + assert(eventualDb.auth("user13", "user")); + assert.commandWorked( eventualDb.getSiblingDB("test").runCommand({find: "foo", batchSize: 0})); + assert(!externalDb.auth("user13", "user")); } print("Testing standalone"); |