diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-04-20 11:59:06 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-04-20 12:38:28 -0400 |
commit | 70e47745a78fffcc20b70f8e09a8b80a2b62e3bf (patch) | |
tree | 81ed086d27b6f84f6a336b270e83687c66ecfc57 /jstests/free_mon/free_mon_metrics_perm_del.js | |
parent | 697ed6fa176220f770231ab5f7ac337328a5a53c (diff) | |
download | mongo-70e47745a78fffcc20b70f8e09a8b80a2b62e3bf.tar.gz |
SERVER-34227 FreeMonController - Metrics
Diffstat (limited to 'jstests/free_mon/free_mon_metrics_perm_del.js')
-rw-r--r-- | jstests/free_mon/free_mon_metrics_perm_del.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/jstests/free_mon/free_mon_metrics_perm_del.js b/jstests/free_mon/free_mon_metrics_perm_del.js new file mode 100644 index 00000000000..369a788159d --- /dev/null +++ b/jstests/free_mon/free_mon_metrics_perm_del.js @@ -0,0 +1,31 @@ +// Ensure free monitoring gives up if metrics returns permanently delete +// +load("jstests/free_mon/libs/free_mon.js"); + +(function() { + 'use strict'; + + let mock_web = new FreeMonWebServer(FAULT_PERMANENTLY_DELETE_AFTER_3); + + 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.waitMetrics(4); + + // Make sure the registration document gets removed + const reg = FreeMonGetRegistration(conn); + print(tojson(reg)); + assert.eq(reg, undefined); + + MongoRunner.stopMongod(conn); + + mock_web.stop(); +})(); |