Skip to content

Commit

Permalink
SERVER-9517 Fix tool test to work since "name" field got changed to "…
Browse files Browse the repository at this point in the history
…user"
  • Loading branch information
stbrody committed Oct 10, 2013
1 parent f86275a commit cda26fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jstests/tool/dumprestore5.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ assert.eq(0, db.system.indexes.count(), "didn't drop indexes")
t.runTool("restore", "--dir", t.ext)

assert.soon("db.system.users.findOne()", "no data after restore");
assert.eq(1, db.system.users.find({name:'user'}).count(), "didn't restore users")
assert.eq(1, db.system.users.find({user:'user'}).count(), "didn't restore users")
assert.eq(2, db.system.indexes.count(), "didn't restore indexes")

db.dropUser('user')
db.addUser('user2', 'password2', jsTest.basicUserRoles)

t.runTool("restore", "--dir", t.ext, "--drop")

assert.soon("1 == db.system.users.find({name:'user'}).count()", "didn't restore users 2")
assert.eq(0, db.system.users.find({name:'user2'}).count(), "didn't drop users")
assert.soon("1 == db.system.users.find({user:'user'}).count()", "didn't restore users 2")
assert.eq(0, db.system.users.find({user:'user2'}).count(), "didn't drop users")
assert.eq(2, db.system.indexes.count(), "didn't maintain indexes")

t.stop();
Expand Down

0 comments on commit cda26fb

Please sign in to comment.