mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
github test fix
This commit is contained in:
@@ -34,20 +34,15 @@ const chai = require("chai");
|
||||
const chaiSubset = require('chai-subset');
|
||||
const fs = require('fs');
|
||||
const expect = chai.expect;
|
||||
const asyncTimeout = 200000;
|
||||
const asyncTimeout = 270000;
|
||||
chai.use(chaiSubset);
|
||||
|
||||
global.EXTERNAL_CONFIG_FILE = "tests/rpki_tests/config.rpki.test.external-roas.yml";
|
||||
global.EXTERNAL_ROA_EXPIRATION_TEST = 10000;
|
||||
global.EXTERNAL_ROA_EXPIRATION_TEST = 90000;
|
||||
|
||||
// ROAs before
|
||||
fs.copyFileSync("tests/rpki_tests/roas.before.json", "tests/rpki_tests/roas.json");
|
||||
|
||||
setTimeout(() => {
|
||||
// ROAs after
|
||||
fs.copyFileSync("tests/rpki_tests/roas.after.json", "tests/rpki_tests/roas.json");
|
||||
}, 30000);
|
||||
|
||||
const worker = require("../../index");
|
||||
const pubSub = worker.pubSub;
|
||||
|
||||
@@ -143,5 +138,11 @@ describe("RPKI monitoring external", function() {
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
// ROAs after
|
||||
fs.copyFileSync("tests/rpki_tests/roas.after.json", "tests/rpki_tests/roas.json");
|
||||
}, global.EXTERNAL_ROA_EXPIRATION_TEST + 10000);
|
||||
|
||||
|
||||
}).timeout(asyncTimeout);
|
||||
});
|
@@ -46,9 +46,6 @@ const pubSub = worker.pubSub;
|
||||
|
||||
describe("RPKI monitoring external", function() {
|
||||
|
||||
//Test rpki watch file reloading
|
||||
fs.copyFileSync("tests/rpki_tests/vrp.correct.json", "tests/rpki_tests/vrp.json");
|
||||
|
||||
it("external connector", function (done) {
|
||||
|
||||
const expectedData = {
|
||||
@@ -97,6 +94,9 @@ describe("RPKI monitoring external", function() {
|
||||
}
|
||||
});
|
||||
|
||||
//Test rpki watch file reloading
|
||||
fs.copyFileSync("tests/rpki_tests/vrp.correct.json", "tests/rpki_tests/vrp.json");
|
||||
|
||||
setTimeout(() => { // Wait that the watcher realizes the file changed
|
||||
pubSub.publish("test-type", "rpki");
|
||||
started = true;
|
||||
|
Reference in New Issue
Block a user