summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorVincent Do <do.vincent@live.com>2016-05-17 11:35:04 -0400
committerVincent Do <vincent.do@mongodb.com>2016-05-26 16:55:19 -0400
commitcbb1f07f40d8487bfeb5dfce4ccfb5d461d9a2f6 (patch)
tree79b74ab43064c00a968e008719a5306f10fa6d52 /jstests/auth
parent646cc051cae9a87d2b27c43a45a13dbf507faf60 (diff)
downloadmongo-cbb1f07f40d8487bfeb5dfce4ccfb5d461d9a2f6.tar.gz
SERVER-24160 Add auth and auth test for lockInfo command
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/lib/commands_lib.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 2cc54f30eff..19e28ee502f 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -789,6 +789,20 @@ var authCommandsLib = {
]
},
{
+ testname: 'lockInfo',
+ command: {lockInfo: 1},
+ skipSharded: true,
+ testcases: [
+ {
+ runOnDb: adminDbName,
+ roles: roles_monitoring,
+ privileges: [{resource: {cluster: true}, actions: ['lockInfo']}]
+ },
+ {runOnDb: firstDbName, roles: {}, expectFail: true},
+ {runOnDb: secondDbName, roles: {}, expectFail: true}
+ ]
+ },
+ {
testname: "dataSize_1",
command: {dataSize: firstDbName + ".x"},
testcases: [{