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:
parent
8dc7a2363f
commit
e83b97b5fb
@ -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
|
||||
|
@ -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();
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user