Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Lubron Zhan <[email protected]>
  • Loading branch information
lubronzhan committed Jul 17, 2024
1 parent 8275421 commit dcf568b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/dag/gatewayapi_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2545,8 +2545,8 @@ func addRouteNotAcceptedConditionDueToMatchConflict(routeAccessor *status.RouteP
status.ReasonRouteRuleMatchConflict,
fmt.Sprintf(status.MessageRouteRuleMatchConflict, routeKind, routeKind),
)

}

func addRoutePartiallyInvalidConditionDueToMatchPartiallyConflict(routeAccessor *status.RouteParentStatusUpdate, routeKind string) {
routeAccessor.AddCondition(
gatewayapi_v1.RouteConditionPartiallyInvalid,
Expand Down
2 changes: 0 additions & 2 deletions internal/dag/gatewayapi_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,6 @@ func TestSortRoutes(t *testing.T) {

for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {

res := sortHTTPRoutes(tc.m)
assert.Equal(t, tc.expected, res)
})
Expand Down Expand Up @@ -1428,7 +1427,6 @@ func TestSortGRPCRoutes(t *testing.T) {

for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {

res := sortGRPCRoutes(tc.m)
assert.Equal(t, tc.expected, res)
})
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/gateway/grpc_route_conflict_match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func testGRPCRouteConflictMatch(namespace string, gateway types.NamespacedName)
}},
},
}
_, ok := f.CreateGRPCRouteAndWaitFor(route1, e2e.GRPCRouteAccepted)
ok := f.CreateGRPCRouteAndWaitFor(route1, e2e.GRPCRouteAccepted)
require.True(f.T(), ok)

By("create grpcroute-2 with conflicted matches")
Expand Down Expand Up @@ -87,7 +87,7 @@ func testGRPCRouteConflictMatch(namespace string, gateway types.NamespacedName)
},
},
}
_, ok = f.CreateGRPCRouteAndWaitFor(route2, e2e.GRPCRouteNotAcceptedDueToConflict)
ok = f.CreateGRPCRouteAndWaitFor(route2, e2e.GRPCRouteNotAcceptedDueToConflict)
require.True(f.T(), ok)

cleanup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func testGRPCRoutePartiallyConflictMatch(namespace string, gateway types.Namespa
}},
},
}
_, ok := f.CreateGRPCRouteAndWaitFor(route1, e2e.GRPCRouteAccepted)
ok := f.CreateGRPCRouteAndWaitFor(route1, e2e.GRPCRouteAccepted)
require.True(f.T(), ok)

By("create grpcroute-2 with only partially conflicted matches")
Expand Down

0 comments on commit dcf568b

Please sign in to comment.