0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-55824 Make ssl_get_more.js start shards as replicaset

This commit is contained in:
Tommaso Tocci 2021-06-01 09:49:03 +02:00 committed by Evergreen Agent
parent 8dc7a2363f
commit e83b97b5fb
2 changed files with 6 additions and 13 deletions

View File

@ -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

View File

@ -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();
}());