Skip to content

Commit 7ddf286

Browse files
committed
fix ut
1 parent 45cf623 commit 7ddf286

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package middlewares
22

33
import (
4-
"net"
54
"net/netip"
65

76
"github.com/Azure/azure-container-networking/cns"
@@ -74,7 +73,7 @@ func (k *K8sSWIFTv2Middleware) addRoutes(cidrs []string) []cns.Route {
7473
for i, cidr := range cidrs {
7574
routes[i] = cns.Route{
7675
IPAddress: cidr,
77-
GatewayIPAddress: "", // gateway IP is not required for infraNIC for containerd to program the pod
76+
GatewayIPAddress: "", // gateway IP is not required for infraNIC routes
7877
}
7978
}
8079
return routes

cns/middlewares/k8sSwiftV2_windows_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ func TestSetRoutesSuccess(t *testing.T) {
4343
Routes: []cns.Route{
4444
{
4545
IPAddress: "10.0.0.0/16",
46-
GatewayIPAddress: "10.0.0.1",
46+
GatewayIPAddress: "",
4747
},
4848
{
4949
IPAddress: "10.240.0.10/16",
50-
GatewayIPAddress: "10.240.0.1",
50+
GatewayIPAddress: "",
5151
},
5252
{
5353
IPAddress: "0.0.0.0/0",

0 commit comments

Comments
 (0)