summaryrefslogtreecommitdiff
path: root/jstests/auth/lib/commands_lib.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/auth/lib/commands_lib.js')
-rw-r--r--jstests/auth/lib/commands_lib.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 6899d0646aa..99b6d9a6924 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -5972,7 +5972,29 @@ var authCommandsLib = {
{killCursors: "$cmd.aggregate", cursors: [response.cursor.id]}));
}
}
- }
+ },
+ {
+ testname: "startRecordingTraffic",
+ command: {startRecordingTraffic: 1, filename: "notARealPath"},
+ testcases: [
+ {runOnDb: adminDbName, roles: roles_hostManager},
+ ],
+ teardown: (db, response) => {
+ if (response.ok) {
+ assert.commandWorked(db.runCommand({stopRecordingTraffic: 1}));
+ }
+ }
+ },
+ {
+ testname: "stopRecordingTraffic",
+ command: {stopRecordingTraffic: 1},
+ testcases: [
+ {runOnDb: adminDbName, roles: roles_hostManager},
+ ],
+ setup: function(db) {
+ db.runCommand({startRecordingTraffic: 1, filename: "notARealPath"});
+ }
+ },
],
/************* SHARED TEST LOGIC ****************/