f-41: l3vni: suppression d'une VPC routée sans section bgp #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-12 13:05:24 +02:00
commit 0679639b95
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
9 changed files with 56 additions and 28 deletions

View file

@ -97,6 +97,23 @@ func TestRoutingTeardownFollowsTheOrderFRRRequires(t *testing.T) {
}
}
func TestRoutingTeardownTakesTheASNOfTheInstanceFromFRR(t *testing.T) {
want := []step{
{"router bgp 64600 vrf vrf-a1b2", "address-family ipv4 unicast", "no redistribute kernel"},
{"vrf vrf-a1b2", "no vni 4001"},
{"no router bgp 64600 vrf vrf-a1b2"},
{"no route-map EXPORT-a1b2"},
{"no ip prefix-list PL-a1b2"},
}
for _, asn := range []uint32{0, 64601} {
v := labVRF(t)
v.ASN = asn
if got := routingTeardown(v, fullRunning); !reflect.DeepEqual(got, want) {
t.Errorf("asn %d :\n%q\nattendu :\n%q", asn, got, want)
}
}
}
func TestRoutingTeardownIgnoresAVRFWhoseNameExtendsOurs(t *testing.T) {
if got := routingTeardown(labVRF(t), otherOnlyRunning); got != nil {
t.Errorf("étapes visant vrf-a1b2c : %q", got)