mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
refactoring of roa tests
This commit is contained in:
@@ -8,8 +8,8 @@ connectors:
|
||||
|
||||
monitors:
|
||||
- file: monitorROAS
|
||||
channel: rpki
|
||||
name: rpki-monitor
|
||||
channel: roa
|
||||
name: roa-monitor
|
||||
params:
|
||||
enableDiffAlerts: true
|
||||
enableExpirationAlerts: true
|
||||
|
@@ -8,12 +8,12 @@ connectors:
|
||||
|
||||
monitors:
|
||||
- file: monitorRPKI
|
||||
channel: rpki
|
||||
name: rpki-monitor
|
||||
channel: roa
|
||||
name: roa-monitor
|
||||
params:
|
||||
checkDisappearing: true
|
||||
thresholdMinPeers: 1
|
||||
checkUncovered: true
|
||||
checkUncovered: false
|
||||
cacheValidPrefixesSeconds: 3600
|
||||
|
||||
|
||||
|
@@ -51,7 +51,7 @@ describe("RPKI monitoring external", function() {
|
||||
|
||||
"a82_112_100_0_24-2914-null": {
|
||||
id: 'a82_112_100_0_24-2914-null',
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: '82.112.100.0/24',
|
||||
message: 'The route 82.112.100.0/24 announced by AS2914 is no longer covered by a ROA'
|
||||
}
|
||||
@@ -61,7 +61,7 @@ describe("RPKI monitoring external", function() {
|
||||
let rpkiTestCompletedExternal = false;
|
||||
let started = false;
|
||||
|
||||
pubSub.subscribe("rpki", function (message, type) {
|
||||
pubSub.subscribe("roa", function (message, type) {
|
||||
try {
|
||||
if (started && !rpkiTestCompletedExternal) {
|
||||
message = JSON.parse(JSON.stringify(message));
|
||||
|
@@ -59,7 +59,7 @@ describe("RPKI monitoring external", function() {
|
||||
"disappeared-ripe": {
|
||||
id: 'disappeared-ripe',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: 'ripe',
|
||||
message: 'Possible TA malfunction or incomplete VRP file: 60.00% of the ROAs disappeared from ripe',
|
||||
data: [
|
||||
@@ -72,7 +72,7 @@ describe("RPKI monitoring external", function() {
|
||||
"expiring-ripe": {
|
||||
id: 'expiring-ripe',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: 'ripe',
|
||||
message: 'Possible TA malfunction or incomplete VRP file: 50.00% of the ROAs are expiring in ripe',
|
||||
data: [
|
||||
@@ -87,7 +87,7 @@ describe("RPKI monitoring external", function() {
|
||||
"28c7aa78b6286e0e3c6583797f7df47c": {
|
||||
id: '28c7aa78b6286e0e3c6583797f7df47c',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: 2914,
|
||||
message: 'The following ROAs will expire in less than 2 hours: <1.2.3.0/24, 2914, 24, ripe>',
|
||||
|
||||
@@ -95,28 +95,28 @@ describe("RPKI monitoring external", function() {
|
||||
"47807c7558dbe001b4aad9f3a87eb427": {
|
||||
id: '47807c7558dbe001b4aad9f3a87eb427',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: '94.5.4.3/22',
|
||||
message: 'ROAs change detected: removed <94.5.4.3/22, 2914, 22, ripe>'
|
||||
},
|
||||
"de3bd9a6cdeeb05e1c2c7c04f7220485" : {
|
||||
id: 'de3bd9a6cdeeb05e1c2c7c04f7220485',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: '2001:db8:123::/48',
|
||||
message: 'ROAs change detected: removed <2001:db8:123::/48, 65000, 48, ripe>'
|
||||
},
|
||||
"129aafe3c8402fb045b71e810a73d425": {
|
||||
id: '129aafe3c8402fb045b71e810a73d425',
|
||||
truncated: false,
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: 2914,
|
||||
message: 'ROAs change detected: removed <2.3.4.0/24, 2914, 24, ripe>'
|
||||
}
|
||||
};
|
||||
|
||||
let rpkiTestCompletedExternal = false;
|
||||
pubSub.subscribe("rpki", function (message, type) {
|
||||
pubSub.subscribe("roa", function (message, type) {
|
||||
|
||||
try {
|
||||
if (!rpkiTestCompletedExternal) {
|
||||
|
@@ -55,7 +55,7 @@ describe("RPKI monitoring external", function() {
|
||||
|
||||
"a82_112_100_0_24-2914-false" : {
|
||||
id: 'a82_112_100_0_24-2914-false',
|
||||
origin: 'rpki-monitor',
|
||||
origin: 'roa-monitor',
|
||||
affected: '82.112.100.0/24',
|
||||
message: 'The route 82.112.100.0/24 announced by AS2914 is not RPKI valid. Valid ROAs: 82.112.100.0/24|AS1234|maxLength:24'
|
||||
}
|
||||
@@ -64,7 +64,7 @@ describe("RPKI monitoring external", function() {
|
||||
let rpkiTestCompletedExternal = false;
|
||||
let started = false;
|
||||
|
||||
pubSub.subscribe("rpki", function (message, type) {
|
||||
pubSub.subscribe("roa", function (message, type) {
|
||||
try {
|
||||
if (started && !rpkiTestCompletedExternal) {
|
||||
message = JSON.parse(JSON.stringify(message));
|
||||
|
Reference in New Issue
Block a user