fix(api): показывать подтверждённые метрики OSPF
This commit is contained in:
1 parent
e3791f3496
commit
af05ad5cda
13 files changed
+120
-55
No files matched your search
@@ -12,6 +12,7 @@ test("neighbor cost is scoped to device, interface and area", () => {
|
||||
test("conflicting or invalid template costs do not choose a fabricated value", () => {
|
||||
const key = ospfCostKey(1,"ether1","0.0.0.0")
|
||||
assert.equal(buildOspfCostIndex([iface, iface]).get(key), 7)
|
||||
assert.equal(buildOspfCostIndex([{ ...iface, cost: 0 }]).get(key), 0)
|
||||
assert.equal(buildOspfCostIndex([iface, { ...iface, cost: 42 }, iface]).get(key), null)
|
||||
for (const cost of [0, -1, 65536, 1.5]) assert.equal(buildOspfCostIndex([{ ...iface, cost }]).get(key), null)
|
||||
for (const cost of [null, -1, 65536, 1.5]) assert.equal(buildOspfCostIndex([{ ...iface, cost }]).get(key), null)
|
||||
})
|
||||
Reference in new issue
Block a user