diff options
Diffstat (limited to 'jstests/free_mon/free_mon_http_down.js')
-rw-r--r-- | jstests/free_mon/free_mon_http_down.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jstests/free_mon/free_mon_http_down.js b/jstests/free_mon/free_mon_http_down.js new file mode 100644 index 00000000000..aff229614c4 --- /dev/null +++ b/jstests/free_mon/free_mon_http_down.js @@ -0,0 +1,26 @@ +// Validate registration retries if the web server is down. +// +load("jstests/free_mon/libs/free_mon.js"); + +(function() { + 'use strict'; + + let mock_web = new FreeMonWebServer(FAULT_FAIL_REGISTER); + + mock_web.start(); + + let options = { + setParameter: "cloudFreeMonitoringEndpointURL=" + mock_web.getURL(), + enableFreeMonitoring: "on", + verbose: 1, + }; + + const conn = MongoRunner.runMongod(options); + assert.neq(null, conn, 'mongod was unable to start up'); + + mock_web.waitRegisters(3); + + MongoRunner.stopMongod(conn); + + mock_web.stop(); +})(); |