From fa5cc7634cb8d926a4eed5a3aa9e60d34e14c450 Mon Sep 17 00:00:00 2001 From: Sergey Ptashnik Date: Tue, 10 Mar 2026 15:30:10 +0300 Subject: [PATCH] Fix ingress class checks in Contour tests Signed-off-by: Sergey Ptashnik --- pkg/router/contour_test.go | 2 +- test/contour/test-canary.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/router/contour_test.go b/pkg/router/contour_test.go index 71221141..2fc8bf25 100644 --- a/pkg/router/contour_test.go +++ b/pkg/router/contour_test.go @@ -50,7 +50,7 @@ func TestContourRouter_Reconcile(t *testing.T) { require.Len(t, services, 2) assert.Equal(t, int64(100), services[0].Weight) assert.Equal(t, int64(0), services[1].Weight) - assert.Equal(t, "contour", proxy.Annotations["projectcontour.io/ingress.class"]) + assert.Equal(t, "contour", proxy.Spec.IngressClassName) // test update cd, err := mocks.flaggerClient.FlaggerV1beta1().Canaries("default").Get(context.TODO(), "podinfo", metav1.GetOptions{}) diff --git a/test/contour/test-canary.sh b/test/contour/test-canary.sh index 3f4b7304..ef10a9e9 100755 --- a/test/contour/test-canary.sh +++ b/test/contour/test-canary.sh @@ -90,7 +90,7 @@ until ${ok}; do fi done -kubectl -n test get httpproxy podinfo -oyaml | grep 'projectcontour.io/ingress.class: contour' +kubectl -n test get httpproxy podinfo -oyaml | grep 'ingressClassName: contour' echo '✔ Canary initialization test passed' @@ -269,4 +269,4 @@ echo '✔ A/B testing promotion test passed' kubectl -n projectcontour logs deployment/flagger -echo '✔ All tests passed' \ No newline at end of file +echo '✔ All tests passed'