Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SERVER-12369 Assert that user data properly setup in dumprestore_auth…

…3.js test
  • Loading branch information...
commit 7b694b4b38e556af127b67c0b0be7aa08b982822 1 parent bb56b28
@stbrody stbrody authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 jstests/tool/dumprestore_auth3.js
View
6 jstests/tool/dumprestore_auth3.js
@@ -72,6 +72,12 @@ function runTest(shutdownServer) {
db.createUser({user: 'user', pwd: 'password', roles: jsTest.basicUserRoles});
db.createRole({role: 'role', roles: [], privileges:[]});
db.system.users.insert({user:'dbuser', pwd: 'pwd', roles: ['readWrite']});
+ assert.gleSuccess(db);
+
+ assert.eq(1, db.bar.findOne().a);
+ assert.eq(1, db.getUsers().length, "didn't create user");
+ assert.eq(1, db.getRoles().length, "didn't create role");
+ assert.eq(1, db.system.users.count(), "didn't create legacy system.users collection");
jsTestLog("Dump foo database *with* user data");
Please sign in to comment.
Something went wrong with that request. Please try again.