Skip to content

Commit e9fee53

Browse files
test: header routes still exist at the end but with weight 0
Signed-off-by: Kostis Kapelonis <[email protected]>
1 parent ccfe97f commit e9fee53

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

test/e2e/single_grpcroute_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func testSingleGRPCRoute(ctx context.Context, t *testing.T, config *envconf.Conf
191191
wait.WithInterval(SHORT_PERIOD),
192192
)
193193
if err != nil {
194-
logrus.Errorf("grpcRoute %q updation was failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
194+
logrus.Errorf("grpcRoute %q updating failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
195195
t.Error()
196196
return ctx
197197
}

test/e2e/single_header_based_grpcroute_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func testSingleHeaderBasedGRPCRoute(ctx context.Context, t *testing.T, config *e
195195
wait.WithInterval(SHORT_PERIOD),
196196
)
197197
if err != nil {
198-
logrus.Errorf("grpcRoute %q updation was failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
198+
logrus.Errorf("grpcRoute %q updating failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
199199
t.Error()
200200
return ctx
201201
}
@@ -268,14 +268,14 @@ func testSingleHeaderBasedGRPCRoute(ctx context.Context, t *testing.T, config *e
268268
getMatchHeaderBasedGRPCRouteFetcher(
269269
t,
270270
FIRST_CANARY_ROUTE_WEIGHT,
271-
FIRST_HEADER_BASED_GRPC_ROUTE_VALUE,
271+
LAST_HEADER_BASED_GRPC_ROUTE_VALUE,
272272
),
273273
),
274274
wait.WithTimeout(LONG_PERIOD),
275275
wait.WithInterval(SHORT_PERIOD),
276276
)
277277
if err != nil {
278-
logrus.Errorf("last grpcRoute %q updation was failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
278+
logrus.Errorf("last grpcRoute %q update failed: %s", resourcesMap[GRPC_ROUTE_KEY].GetName(), err)
279279
t.Error()
280280
return ctx
281281
}
@@ -318,14 +318,12 @@ func getMatchHeaderBasedGRPCRouteFetcher(t *testing.T, targetWeight int32, targe
318318
t.Error()
319319
return false
320320
}
321-
// logrus.Info("k8s object was type asserted")
322321
err := runtime.DefaultUnstructuredConverter.FromUnstructured(unstructuredGRPCRoute.Object, &grpcRoute)
323322
if err != nil {
324323
logrus.Errorf("conversation from unstructured grpcRoute %q to the typed grpcRoute was failed", unstructuredGRPCRoute.GetName())
325324
t.Error()
326325
return false
327326
}
328-
// logrus.Infof("unstructured grpcRoute %q was converted to the typed grpcRoute", grpcRoute.GetName())
329327
rules := grpcRoute.Spec.Rules
330328
if targetHeaderBasedRouteValue.Type == nil {
331329
return len(rules) == LAST_HEADER_BASED_RULES_LENGTH &&

test/e2e/single_header_based_httproute_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func testSingleHeaderBasedHTTPRoute(ctx context.Context, t *testing.T, config *e
195195
wait.WithInterval(SHORT_PERIOD),
196196
)
197197
if err != nil {
198-
logrus.Errorf("httpRoute %q updation was failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
198+
logrus.Errorf("httpRoute %q updating failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
199199
t.Error()
200200
return ctx
201201
}
@@ -268,14 +268,14 @@ func testSingleHeaderBasedHTTPRoute(ctx context.Context, t *testing.T, config *e
268268
getMatchHeaderBasedHTTPRouteFetcher(
269269
t,
270270
FIRST_CANARY_ROUTE_WEIGHT,
271-
FIRST_HEADER_BASED_HTTP_ROUTE_VALUE,
271+
LAST_HEADER_BASED_HTTP_ROUTE_VALUE,
272272
),
273273
),
274274
wait.WithTimeout(LONG_PERIOD),
275275
wait.WithInterval(SHORT_PERIOD),
276276
)
277277
if err != nil {
278-
logrus.Errorf("last httpRoute %q updation was failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
278+
logrus.Errorf("last httpRoute %q update failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
279279
t.Error()
280280
return ctx
281281
}

test/e2e/single_httproute_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func testSingleHTTPRoute(ctx context.Context, t *testing.T, config *envconf.Conf
193193
wait.WithInterval(SHORT_PERIOD),
194194
)
195195
if err != nil {
196-
logrus.Errorf("httpRoute %q updation was failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
196+
logrus.Errorf("httpRoute %q updating failed: %s", resourcesMap[HTTP_ROUTE_KEY].GetName(), err)
197197
t.Error()
198198
return ctx
199199
}

test/e2e/single_tcproute_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func testSingleTCPRoute(ctx context.Context, t *testing.T, config *envconf.Confi
191191
wait.WithInterval(SHORT_PERIOD),
192192
)
193193
if err != nil {
194-
logrus.Errorf("tcpRoute %q updation was failed: %s", resourcesMap[TCP_ROUTE_KEY].GetName(), err)
194+
logrus.Errorf("tcpRoute %q updating failed: %s", resourcesMap[TCP_ROUTE_KEY].GetName(), err)
195195
t.Error()
196196
return ctx
197197
}

0 commit comments

Comments
 (0)