summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2020-12-14 22:42:02 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-21 02:53:42 +0000
commit5e53a2aa8e20a9fd48afc4d8eb477566ac0cd9b9 (patch)
treebede69fe2ad1ba28073c57c266d48091fb136ca7 /jstests/auth
parenta083e8eb752096f849f847964cc764e662b8d4cf (diff)
downloadmongo-5e53a2aa8e20a9fd48afc4d8eb477566ac0cd9b9.tar.gz
SERVER-51081 Add a way to "try abort" a tenant migration
Diffstat (limited to 'jstests/auth')
-rw-r--r--jstests/auth/lib/commands_lib.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 268c2640fe0..3032f169c00 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -3357,6 +3357,25 @@ var authCommandsLib = {
]
},
{
+ testname: "donorAbortMigration",
+ command: {
+ donorAbortMigration: 1,
+ migrationId: UUID(),
+ },
+ skipSharded: true,
+ testcases: [
+ {
+ runOnDb: adminDbName,
+ roles: roles_clusterManager,
+ privileges: [{resource: {cluster: true}, actions: ["runTenantMigration"]}],
+ // This is expected to throw NoSuchTenantMigration.
+ expectFail: true,
+ },
+ {runOnDb: firstDbName, roles: {}},
+ {runOnDb: secondDbName, roles: {}}
+ ]
+ },
+ {
testname: "donorForgetMigration",
command: {
donorForgetMigration: 1,