diff options
Diffstat (limited to 'jstests/ssl/speculative-authenticate.js')
-rw-r--r-- | jstests/ssl/speculative-authenticate.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/jstests/ssl/speculative-authenticate.js b/jstests/ssl/speculative-authenticate.js index 492469466df..41b7139230f 100644 --- a/jstests/ssl/speculative-authenticate.js +++ b/jstests/ssl/speculative-authenticate.js @@ -8,7 +8,6 @@ const mongod = MongoRunner.runMongod({ tlsMode: 'requireTLS', tlsCertificateKeyFile: 'jstests/libs/server.pem', tlsCAFile: 'jstests/libs/ca.pem', - clusterAuthMode: "x509", }); const admin = mongod.getDB('admin'); const external = mongod.getDB('$external'); @@ -33,19 +32,6 @@ function test(uri) { assert.eq(0, x509); } -function testInternal(uri) { - const x509 = runMongoProgram('mongo', - '--tls', - '--tlsCAFile', - 'jstests/libs/ca.pem', - '--tlsCertificateKeyFile', - 'jstests/libs/server.pem', - uri, - '--eval', - ';'); - assert.eq(0, x509); -} - function assertStats(cb) { const mechStats = assert.commandWorked(admin.runCommand({serverStatus: 1})) .security.authentication.mechanisms; @@ -78,23 +64,5 @@ assertStats(function(mechStats) { assert.eq(stats.successful, 1); }); -// We haven't done any cluster auth yet, so clusterAuthenticate counts should be 0 -assertStats(function(mechStats) { - const stats = mechStats['MONGODB-X509'].clusterAuthenticate; - assert.eq(stats.received, 0); - assert.eq(stats.successful, 0); -}); - -// Connect intra-cluster with speculation. -testInternal(baseURI + '?authMechanism=MONGODB-X509'); -assertStats(function(mechStats) { - const specStats = mechStats['MONGODB-X509'].speculativeAuthenticate; - const clusterStats = mechStats['MONGODB-X509'].clusterAuthenticate; - assert.eq(specStats.received, 2); - assert.eq(specStats.successful, 2); - assert.eq(clusterStats.received, 1); - assert.eq(clusterStats.successful, 1); -}); - MongoRunner.stopMongod(mongod); })(); |