summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2017-09-20 17:50:18 -0400
committerJason Carey <jcarey@argv.me>2017-10-03 18:44:26 -0400
commit3805ccdc25facfe536302321ee4fb485f7030d0c (patch)
tree67eef6bff793cd246e42a415f2ed8393a4bbd620 /jstests/auth
parent4c979fe564f6c6e1081af495eba421d10ae0d086 (diff)
downloadmongo-3805ccdc25facfe536302321ee4fb485f7030d0c.tar.gz
SERVER-31289 Add test only $listLocalCursors
In order to make the kill sessions test a bit more reliable, adding a test only agg stage that returns minimal info about cursors. That way we can see if we killed our specific cursors, rather than looking at global counts.
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/lib/commands_lib.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 207f34d574a..d7d6b6c85b7 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -663,6 +663,15 @@ var authCommandsLib = {
skipSharded: true
},
{
+ testname: "aggregate_listLocalCursors",
+ command: {aggregate: 1, pipeline: [{$listLocalCursors: {}}], cursor: {}},
+ testcases: [{
+ runOnDb: adminDbName,
+ roles:
+ {clusterAdmin: 1, clusterMonitor: 1, clusterManager: 1, root: 1, __system: 1}
+ }],
+ },
+ {
testname: "aggregate_listLocalSessions_allUsers_true",
command: {aggregate: 1, pipeline: [{$listLocalSessions: {allUsers: true}}], cursor: {}},
testcases: [{