Make code match documentation :-)

Bridge Domains must be [1,16M), Loopbacks must be [0,4096).
Loopbacks should be allowed to have an address without an LCP.
 => Reuse the unittest file for the bounds check for loopbacks.
 => Add a new unittest file for the bounds check for bridgedomains.
This commit is contained in:
Pim van Pelt
2022-04-03 14:07:56 +00:00
parent 15daa65c0b
commit 00731e38f1
4 changed files with 28 additions and 8 deletions

View File

@ -1,12 +1,12 @@
test:
description: "Cannot give an IP address to a loopback without LCP"
description: "Loopback instances must be between 0 and 4095"
errors:
expected:
- "loopback .* has an address but no LCP"
- "loopback .* has instance 4096 which is too large"
count: 1
---
loopbacks:
loop10:
description: "Loopback instance loop10, with address, but no LCP"
mtu: 9216
addresses: [ 192.0.2.1/29 ]
loop4095:
description: "Cool."
loop4096:
description: "Not cool."