diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2021-06-01 09:49:03 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-11 16:53:26 +0000 |
commit | 87f426358859c07d82da48b6ecf041fd27698a94 (patch) | |
tree | 3b280643a7f92737f281acd7421c0633c18c5694 | |
parent | a14db33ecb2ff81f18fd4e479e910a89f4499f81 (diff) | |
download | mongo-87f426358859c07d82da48b6ecf041fd27698a94.tar.gz |
SERVER-55824 Make ssl_get_more.js start shards as replicaset
(cherry picked from commit e83b97b5fbc4a2c0cd8e8244391055438ded300a)
-rw-r--r-- | jstests/ssl/libs/ssl_helpers.js | 1 | ||||
-rw-r--r-- | jstests/ssl_x509/ssl_get_more.js | 18 |
2 files changed, 6 insertions, 13 deletions
diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js index 47edce2196e..457927907dc 100644 --- a/jstests/ssl/libs/ssl_helpers.js +++ b/jstests/ssl/libs/ssl_helpers.js @@ -11,6 +11,7 @@ var SERVER_CERT = "jstests/libs/server.pem"; var CA_CERT = "jstests/libs/ca.pem"; var CLIENT_CERT = "jstests/libs/client.pem"; var DH_PARAM = "jstests/libs/8k-prime.dhparam"; +var CLUSTER_CERT = "jstests/libs/cluster_cert.pem"; // Note: "sslAllowInvalidCertificates" is enabled to avoid // hostname conflicts with our testing certificates diff --git a/jstests/ssl_x509/ssl_get_more.js b/jstests/ssl_x509/ssl_get_more.js index f7cf987d660..a1cee4da54c 100644 --- a/jstests/ssl_x509/ssl_get_more.js +++ b/jstests/ssl_x509/ssl_get_more.js @@ -1,14 +1,10 @@ (function() { "use strict"; -const x509_options = { - sslMode: "requireSSL", - sslPEMKeyFile: "jstests/libs/server.pem", - sslCAFile: "jstests/libs/ca.pem", - sslClusterFile: "jstests/libs/cluster_cert.pem", - sslAllowInvalidHostnames: "", - clusterAuthMode: "x509" -}; +load('jstests/ssl/libs/ssl_helpers.js'); + +const x509_options = + Object.extend(requireSSL, {sslClusterFile: CLUSTER_CERT, clusterAuthMode: "x509"}); const st = new ShardingTest({ shards: 1, @@ -17,8 +13,7 @@ const st = new ShardingTest({ configOptions: x509_options, mongosOptions: x509_options, rsOptions: x509_options, - shardOptions: x509_options, - shardAsReplicaSet: false + shardOptions: x509_options } }); @@ -62,8 +57,5 @@ if (st.configRS) { const x509User = 'CN=client,OU=KernelUser,O=MongoDB,L=New York City,ST=New York,C=US'; st.s.getDB('$external').createUser({user: x509User, roles: [{role: '__system', db: 'admin'}]}); -// Orphan checks needs a privileged user to auth as. -st.shard0.getDB('$external').createUser({user: x509User, roles: [{role: '__system', db: 'admin'}]}); - st.stop(); }()); |