summaryrefslogtreecommitdiff
path: root/jstests/ocsp
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/ocsp')
-rw-r--r--jstests/ocsp/ocsp_stapling.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/jstests/ocsp/ocsp_stapling.js b/jstests/ocsp/ocsp_stapling.js
index 4d7e3c0532b..630b544c9be 100644
--- a/jstests/ocsp/ocsp_stapling.js
+++ b/jstests/ocsp/ocsp_stapling.js
@@ -14,9 +14,6 @@ if (!supportsStapling()) {
return;
}
-let mock_ocsp = new MockOCSPServer("", 1000);
-mock_ocsp.start();
-
const ocsp_options = {
sslMode: "requireSSL",
sslPEMKeyFile: OCSP_SERVER_CERT,
@@ -27,8 +24,19 @@ const ocsp_options = {
},
};
+// This is to test what happens when the responder is down,
+// making sure that we soft fail.
let conn = null;
+assert.doesNotThrow(() => {
+ conn = MongoRunner.runMongod(ocsp_options);
+});
+
+MongoRunner.stopMongod(conn);
+
+let mock_ocsp = new MockOCSPServer("", 1000);
+mock_ocsp.start();
+
// In this scenario, the Mongod has the ocsp response stapled
// which should allow the connection to proceed. Even when the
// responder says that the certificate is revoked, the mongod