summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAndreas Nilsson <andreas.nilsson@10gen.com>2015-01-08 14:16:37 -0500
committerAndreas Nilsson <andreas.nilsson@10gen.com>2015-01-12 12:09:44 -0500
commitfc2f13fc2e964f9079ffe7354840275db6b15983 (patch)
treee6d7ee7a4555a045f6d6cd3942525ed68c2444c3 /jstests
parent078169dbca5b23adc03ef5b16a1327a0cfd55b91 (diff)
downloadmongo-fc2f13fc2e964f9079ffe7354840275db6b15983.tar.gz
SERVER-16780 Add cleanupOrphaned to commands_lib.js
Diffstat (limited to 'jstests')
-rw-r--r--jstests/auth/lib/commands_lib.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 7d00aea5965..043c15fc2dd 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -375,6 +375,23 @@ var authCommandsLib = {
]
},
{
+ testname: "cleanupOrphaned",
+ command: {cleanupOrphaned: firstDbName + ".x"},
+ skipSharded: true,
+ testcases: [
+ {
+ runOnDb: adminDbName,
+ roles: roles_clusterManager,
+ privileges: [
+ { resource: {cluster: true}, actions: ["cleanupOrphaned"] }
+ ],
+ expectFail: true
+ },
+ { runOnDb: firstDbName, roles: {} },
+ { runOnDb: secondDbName, roles: {} }
+ ]
+ },
+ {
testname: "cloneCollection_1",
command: {cloneCollection: firstDbName + ".x"},
skipSharded: true,