Skip to content

Commit 4a60e5f

Browse files
committed
fix the ut
1 parent f921617 commit 4a60e5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cns/middlewares/k8sSwiftV2_linux_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,10 @@ func TestSetRoutesFailure(t *testing.T) {
378378
}
379379

380380
func TestAddRoutes(t *testing.T) {
381+
middleware := K8sSWIFTv2Middleware{Cli: mock.NewClient()}
381382
cidrs := []string{"10.0.0.0/24", "20.0.0.0/24"}
382383
gatewayIP := "192.168.1.1"
383-
routes := addRoutes(cidrs, gatewayIP)
384+
routes := middleware.addRoutes(cidrs, gatewayIP)
384385
expectedRoutes := []cns.Route{
385386
{
386387
IPAddress: "10.0.0.0/24",

0 commit comments

Comments
 (0)