1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

updated test for new uptime configuration

This commit is contained in:
Massimo Candela
2019-12-13 03:15:36 +01:00
parent 2e40a85323
commit 9a4d73dd8d
3 changed files with 16 additions and 12 deletions

View File

@@ -74,7 +74,7 @@ describe("Composition", function() {
"monitoredPrefixesFiles", "monitoredPrefixesFiles",
"logging", "logging",
"checkForUpdatesAtBoot", "checkForUpdatesAtBoot",
"uptimeMonitor", "uptimeMonitors",
"pidFile" "pidFile"
]); ]);
expect(config.connectors[0]).to.have expect(config.connectors[0]).to.have

View File

@@ -48,17 +48,19 @@ describe("Uptime Monitor", function() {
var config = worker.config; var config = worker.config;
it("uptime config", function () { it("uptime config", function () {
expect(config.uptimeMonitor).to.have expect(config.uptimeMonitors[0]).to
.keys([ .containSubset({
"active", params: {
"useStatusCodes", useStatusCodes: true,
"port" host: null,
]); port: 8011
}
});
}); });
it("API format and header", function (done) { it("API format and header", function (done) {
const port = config.uptimeMonitor.port; const port = config.uptimeMonitors[0].params.port;
axios({ axios({
method: 'get', method: 'get',

View File

@@ -63,9 +63,11 @@ logging:
checkForUpdatesAtBoot: true checkForUpdatesAtBoot: true
uptimeMonitor: uptimeMonitors:
active: true - file: uptimeApi
useStatusCodes: true params:
port: 8011 useStatusCodes: true
host: null
port: 8011
pidFile: bgpalerter.pid pidFile: bgpalerter.pid