f-90: vm, vpc, watchdog: redirections en nft, retrait d'iptables #90

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-31 14:15:07 +01:00
commit 682696214a
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
10 changed files with 31 additions and 173 deletions

View file

@ -18,3 +18,17 @@ func TestNicMACs_KeepsTheOrderAndLowersTheCase(t *testing.T) {
t.Errorf("nicMACs = %v, attendu %v", got, want)
}
}
func TestNicIPs_EveryInterfaceGetsTheRedirect(t *testing.T) {
nics := []nicData{
{index: 0, ip: "10.49.1.10"},
{index: 1, ip: "10.49.2.10", primary: true},
}
got := nicIPs(nics)
want := []string{"10.49.1.10", "10.49.2.10"}
if !reflect.DeepEqual(got, want) {
t.Errorf("nicIPs = %v, attendu %v", got, want)
}
}