@@ -47,7 +47,6 @@ import (
4747 corev1 "k8s.io/api/core/v1"
4848 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4949 k8snet "k8s.io/utils/net"
50- "k8s.io/utils/ptr"
5150)
5251
5352const (
@@ -432,7 +431,7 @@ func (t *handlerTestDriver) testGatewayRoute(ipFamilySubnets []string, nonIPFami
432431 for _ , cidr := range gwRoute .RoutePolicySpec .RemoteCIDRs {
433432 t .ovsdbClient .AwaitModel (& nbdb.LogicalRouterPolicy {
434433 Match : cidr ,
435- Nexthop : ptr . To (gwRoute .RoutePolicySpec .NextHops [0 ]),
434+ Nexthop : new (gwRoute.RoutePolicySpec .NextHops [0 ]),
436435 })
437436
438437 t .ovsdbClient .AwaitModel (& nbdb.LogicalRouterStaticRoute {
@@ -445,7 +444,7 @@ func (t *handlerTestDriver) testGatewayRoute(ipFamilySubnets []string, nonIPFami
445444 for _ , cidr := range gwRoute .RoutePolicySpec .RemoteCIDRs {
446445 t .ovsdbClient .AwaitNoModel (& nbdb.LogicalRouterPolicy {
447446 Match : cidr ,
448- Nexthop : ptr . To (gwRoute .RoutePolicySpec .NextHops [0 ]),
447+ Nexthop : new (gwRoute.RoutePolicySpec .NextHops [0 ]),
449448 })
450449
451450 t .ovsdbClient .AwaitNoModel (& nbdb.LogicalRouterStaticRoute {
@@ -543,7 +542,7 @@ func (t *handlerTestDriver) testGatewayRoute(ipFamilySubnets []string, nonIPFami
543542 Priority : priority ,
544543 Match : ipMatchField + " == " + t .clusterCIDR ,
545544 Action : "reroute" ,
546- Nexthop : ptr . To (t .OVNK8sMgmntIntCIDR [t .ipFamily ].IP .String ()),
545+ Nexthop : new (t.OVNK8sMgmntIntCIDR [t.ipFamily ].IP .String ()),
547546 ExternalIDs : map [string ]string {}, // No submariner tag
548547 }
549548
@@ -608,7 +607,7 @@ func (t *handlerTestDriver) testNonGatewayRoutes(ipFamilyNextHop string, ipFamil
608607 for _ , cidr := range ngr .RoutePolicySpec .RemoteCIDRs {
609608 t .ovsdbClient .AwaitModel (& nbdb.LogicalRouterPolicy {
610609 Match : cidr ,
611- Nexthop : ptr . To (nextHop ),
610+ Nexthop : new (nextHop ),
612611 })
613612 }
614613 }
@@ -617,7 +616,7 @@ func (t *handlerTestDriver) testNonGatewayRoutes(ipFamilyNextHop string, ipFamil
617616 for _ , cidr := range ngr .RoutePolicySpec .RemoteCIDRs {
618617 t .ovsdbClient .AwaitNoModel (& nbdb.LogicalRouterPolicy {
619618 Match : cidr ,
620- Nexthop : ptr . To (nextHop ),
619+ Nexthop : new (nextHop ),
621620 })
622621 }
623622 }
@@ -704,7 +703,7 @@ func (t *handlerTestDriver) testNonGatewayRoutes(ipFamilyNextHop string, ipFamil
704703 for _ , cidr := range nonIPFamilyCIDRs {
705704 t .ovsdbClient .EnsureNoModel (& nbdb.LogicalRouterPolicy {
706705 Match : cidr ,
707- Nexthop : ptr . To (nonIPFamilyNextHop ),
706+ Nexthop : new (nonIPFamilyNextHop ),
708707 })
709708 }
710709 })
0 commit comments