Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyufan2 committed Aug 27, 2024
1 parent 11074b8 commit 97ef12d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cni/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1236,9 +1236,9 @@ func TestGetPodSubnetNatInfo(t *testing.T) {
}

type InterfaceGetterMock struct {
interfaces []net.Interface
intfAddr map[string][]net.Addr // key is interfaceName, value is one interface's CIDRs(IPs+Masks)
err error
interfaces []net.Interface
interfaceAddrs map[string][]net.Addr // key is interfaceName, value is one interface's CIDRs(IPs+Masks)
err error
}

func (n *InterfaceGetterMock) GetNetworkInterfaces() ([]net.Interface, error) {
Expand All @@ -1257,7 +1257,7 @@ func (n *InterfaceGetterMock) GetNetworkInterfaceAddrs(iface *net.Interface) ([]
netAddrs := []net.Addr{}
for _, intf := range n.interfaces {
if iface.Name == intf.Name {
return n.intfAddr[iface.Name], nil
return n.interfaceAddrs[iface.Name], nil
}
}
return netAddrs, nil
Expand Down Expand Up @@ -1821,7 +1821,7 @@ func TestFindMasterInterface(t *testing.T) {
Name: "eth0",
},
},
intfAddr: map[string][]net.Addr{
interfaceAddrs: map[string][]net.Addr{
"eth0": {
&net.IPNet{
IP: net.IPv4(10, 255, 0, 1),
Expand Down Expand Up @@ -1869,7 +1869,7 @@ func TestFindMasterInterface(t *testing.T) {
Name: "eth1",
},
},
intfAddr: map[string][]net.Addr{
interfaceAddrs: map[string][]net.Addr{
"eth0": {
&net.IPNet{
IP: net.IPv4(10, 255, 0, 1),
Expand Down

0 comments on commit 97ef12d

Please sign in to comment.