summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2016-06-17 16:36:37 -0400
committerRandolph Tan <randolph@10gen.com>2016-06-22 15:17:13 -0400
commitf517b05141a3f554d2fe51838ed33bc98cb8c5f2 (patch)
treedd527ea53c22409d32d0255b9d863087b1c60758 /jstests/auth
parent1ceebd31ceb4279cd5126dbb9445d0bba6fc4f5f (diff)
downloadmongo-f517b05141a3f554d2fe51838ed33bc98cb8c5f2.tar.gz
SERVER-24379 Implement addShardToZone and _configsvrAddShardToZone
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/lib/commands_lib.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index f62e6abb1ed..d4213725685 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -2516,6 +2516,28 @@ var authCommandsLib = {
{runOnDb: adminDbName, roles: {__system: 1}, expectFail: true},
]
},
+ {
+ testname: "addShardToZone",
+ command: {addShardToZone: shard0name, zone: 'z'},
+ skipStandalone: true,
+ testcases: [
+ {
+ runOnDb: adminDbName,
+ // addShardToZone only checks that you can write to config.shards,
+ // that's why readWriteAnyDatabase passes.
+ roles: Object.extend({readWriteAnyDatabase: 1}, roles_clusterManager),
+ privileges: [{resource: {db: 'config', collection: 'shards'}, actions: ['update']}],
+ },
+ ]
+ },
+ {
+ testname: "_configsvrAddShardToZone",
+ command: {_configsvrAddShardToZone: shard0name, zone: 'z'},
+ skipSharded: true,
+ testcases: [
+ {runOnDb: adminDbName, roles: {__system: 1}, expectFail: true},
+ ]
+ },
],
/************* SHARED TEST LOGIC ****************/