diff options
author | Ian Whalen <ian.whalen@gmail.com> | 2017-09-22 16:10:50 -0400 |
---|---|---|
committer | Ian Whalen <ian.whalen@gmail.com> | 2017-09-22 16:10:50 -0400 |
commit | ab7ceed2108a7d19518490929b03fa6f4a13257c (patch) | |
tree | a46f487d592c62089f3e58d236e29f843c802b21 /jstests/noPassthrough/refresh_sessions_command.js | |
parent | c4b90fe5509eb70e4009e0d7ddbd71b4b92d0274 (diff) | |
download | mongo-ab7ceed2108a7d19518490929b03fa6f4a13257c.tar.gz |
Revert "SERVER-31174 Move the sessions collection to config.system.sessions"
This reverts commit ba1704f7cbc0b9a03a181df145f75f433a59b7df.
Diffstat (limited to 'jstests/noPassthrough/refresh_sessions_command.js')
-rw-r--r-- | jstests/noPassthrough/refresh_sessions_command.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/jstests/noPassthrough/refresh_sessions_command.js b/jstests/noPassthrough/refresh_sessions_command.js index 80b249faca7..0c08d0891ce 100644 --- a/jstests/noPassthrough/refresh_sessions_command.js +++ b/jstests/noPassthrough/refresh_sessions_command.js @@ -37,14 +37,13 @@ admin.auth("admin", "admin"); result = admin.runCommand({ - createRole: 'readSessionsCollection', - privileges: [{resource: {db: 'config', collection: 'system.sessions'}, actions: ['find']}], + createRole: 'readAdmin', + privileges: [{resource: {db: 'admin', collection: 'system.sessions'}, actions: ['find']}], roles: [] }); - assert.commandWorked(result, "couldn't make readSessionsCollection role"); + assert.commandWorked(result, "couldn't make readAdmin role"); - admin.createUser( - {user: 'readSessionsCollection', pwd: 'pwd', roles: ['readSessionsCollection']}); + admin.createUser({user: 'readAdmin', pwd: 'pwd', roles: ['readAdmin']}); admin.logout(); // Test that we cannot run refreshSessions unauthenticated if --auth is on. @@ -76,12 +75,10 @@ // Test that once we force a refresh, all of these sessions are in the sessions collection. admin.logout(); - admin.auth("readSessionsCollection", "pwd"); + admin.auth("readAdmin", "pwd"); result = admin.runCommand({refreshLogicalSessionCacheNow: 1}); assert.commandWorked(result, "could not force refresh"); - - var config = conn.getDB("config"); - assert.eq(config.system.sessions.count(), 3, "should have refreshed all session records"); + assert.eq(admin.system.sessions.count(), 3, "should have refreshed all session records"); MongoRunner.stopMongod(conn); })(); |