Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Sep 17, 2024
1 parent c64e1a7 commit 11ed256
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions cmd/metal-api/internal/service/switch-service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,35 +1090,35 @@ 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",
},
},
},
},
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,
},
Expand Down Expand Up @@ -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",
},
},
Expand All @@ -1278,15 +1278,15 @@ 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",
},
},
},
"m2": metal.Connections{
metal.Connection{
Nic: metal.Nic{
Name: "Ethernet5",
Name: "Ethernet1",
MacAddress: "bb:bb:bb:bb:bb:b2",
},
},
Expand Down Expand Up @@ -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",
},
},
Expand All @@ -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",
},
},
Expand Down

0 comments on commit 11ed256

Please sign in to comment.