From 11ed256d9602a0ed49465e470ca08fe285206b0d Mon Sep 17 00:00:00 2001 From: iljarotar Date: Tue, 17 Sep 2024 16:32:23 +0200 Subject: [PATCH] fix test --- .../internal/service/switch-service_test.go | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/metal-api/internal/service/switch-service_test.go b/cmd/metal-api/internal/service/switch-service_test.go index 54ebcb74..80d2dae7 100644 --- a/cmd/metal-api/internal/service/switch-service_test.go +++ b/cmd/metal-api/internal/service/switch-service_test.go @@ -1090,15 +1090,15 @@ func Test_adoptNics(t *testing.T) { }, Nics: metal.Nics{ metal.Nic{ - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "bb:bb:bb:bb:bb:b2", }, metal.Nic{ - Name: "Ethernet5", + Name: "Ethernet1", MacAddress: "bb:bb:bb:bb:bb:b3", }, metal.Nic{ - Name: "Ethernet396", + Name: "Ethernet392", MacAddress: "bb:bb:bb:bb:bb:b4", }, }, @@ -1106,19 +1106,19 @@ func Test_adoptNics(t *testing.T) { }, want: metal.Nics{ metal.Nic{ - Name: "Ethernet396", - MacAddress: "bb:bb:bb:bb:bb:b4", - }, - metal.Nic{ - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "bb:bb:bb:bb:bb:b2", Vrf: "vrf1", }, metal.Nic{ - Name: "Ethernet5", + Name: "Ethernet1", MacAddress: "bb:bb:bb:bb:bb:b3", Vrf: "", }, + metal.Nic{ + Name: "Ethernet392", + MacAddress: "bb:bb:bb:bb:bb:b4", + }, }, wantErr: false, }, @@ -1264,11 +1264,11 @@ func Test_adoptMachineConnections(t *testing.T) { OS: &metal.SwitchOS{Vendor: metal.SwitchOSVendorSonic}, Nics: metal.Nics{ metal.Nic{ - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "bb:bb:bb:bb:bb:b1", }, metal.Nic{ - Name: "Ethernet5", + Name: "Ethernet1", MacAddress: "bb:bb:bb:bb:bb:b2", }, }, @@ -1278,7 +1278,7 @@ func Test_adoptMachineConnections(t *testing.T) { "m1": metal.Connections{ metal.Connection{ Nic: metal.Nic{ - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "bb:bb:bb:bb:bb:b1", }, }, @@ -1286,7 +1286,7 @@ func Test_adoptMachineConnections(t *testing.T) { "m2": metal.Connections{ metal.Connection{ Nic: metal.Nic{ - Name: "Ethernet5", + Name: "Ethernet1", MacAddress: "bb:bb:bb:bb:bb:b2", }, }, @@ -1859,7 +1859,7 @@ func Test_adjustNics(t *testing.T) { }, nicMap: map[string]*metal.Nic{ "swp1": { - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "dd:dd:dd:dd:dd:dd", }, }, @@ -1869,7 +1869,7 @@ func Test_adjustNics(t *testing.T) { MacAddress: "11:11:11:11:11:11", Neighbors: []metal.Nic{ { - Name: "Ethernet4", + Name: "Ethernet0", MacAddress: "dd:dd:dd:dd:dd:dd", }, },