blob: 92a6b9cee2d5dbdf3f03ff8aa35036500584022f (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// Test that verifies client metadata behavior for isMaster
(function() {
"use strict";
// Verify that a isMaster request fails if it contains client metadata, and it is not first.
// The shell sends isMaster on the first connection
var result = db.runCommand({"isMaster": 1, "client": {"application": "foobar"}});
assert.commandFailed(result);
assert.eq(result.code, ErrorCodes.ClientMetadataCannotBeMutated, tojson(result));
})();
|