From b175bcb7691caf6adf8e0c943bfc1b14ddf65e31 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Tue, 8 Oct 2024 10:35:01 +0800 Subject: [PATCH] fix: fix slice init length Signed-off-by: cuishuang --- test/e2e/kube-ovn/pod/pod_routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/kube-ovn/pod/pod_routes.go b/test/e2e/kube-ovn/pod/pod_routes.go index 007698b7d8b..f5daeeb6835 100644 --- a/test/e2e/kube-ovn/pod/pod_routes.go +++ b/test/e2e/kube-ovn/pod/pod_routes.go @@ -156,7 +156,7 @@ var _ = framework.SerialDescribe("[group:pod]", func() { framework.ExpectNoError(err) ginkgo.By("Validating pod routes") - actualRoutes := make([]request.Route, len(podRoutes)) + actualRoutes := make([]request.Route, 0, len(podRoutes)) for _, r := range podRoutes { if r.Gateway != "" || r.Dst != "" { actualRoutes = append(actualRoutes, request.Route{Destination: r.Dst, Gateway: r.Gateway})