Skip to content

Commit

Permalink
Clear only ior routes
Browse files Browse the repository at this point in the history
Signed-off-by: Yann Liu <yannliu@redhat.com>
  • Loading branch information
yannuil authored and luksa committed Mar 21, 2023
1 parent bb4816c commit afb11d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/servicemesh/smmr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func ensureRoutesCleared(ctx framework.TestContext) {
}

retry.UntilSuccessOrFail(ctx, func() error {
routes, err := routeClient.RouteV1().Routes(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
routes, err := routeClient.RouteV1().Routes(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: "maistra.io/generated-by=ior"})
if err != nil {
return fmt.Errorf("failed to get Routes: %s", err)
}
Expand All @@ -236,7 +236,10 @@ func ensureRoutesCleared(ctx framework.TestContext) {
}

func clearRoutes(routeClient routeversioned.Interface) error {
routes, err := routeClient.RouteV1().Routes(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
routes, err := routeClient.
RouteV1().
Routes(metav1.NamespaceAll).
List(context.TODO(), metav1.ListOptions{LabelSelector: "maistra.io/generated-by=ior"})
if err != nil {
return err
}
Expand Down

0 comments on commit afb11d2

Please sign in to comment.