From 8195a4e315ac4ffe3f802462ee4347aa0dad8c8a Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Wed, 16 Oct 2024 15:18:31 +0200 Subject: [PATCH] Fix E2E test --- tests/e2e/e2e_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 03dbde51..e2378409 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -124,7 +124,10 @@ spec: { description: "reject unauthenticated requests to the metrics endpoint", expectedLogsMatcher: SatisfyAll( - ContainSubstring("HTTP/1.1 401 Unauthorized"), + SatisfyAny( + ContainSubstring("HTTP/1.1 401 Unauthorized"), + ContainSubstring("HTTP/2 401"), + ), Not(ContainSubstring(`workqueue_work_duration_seconds_count`)), ), }, @@ -132,7 +135,10 @@ spec: description: "reject authenticated requests to the metrics endpoint with a service account token lacking RBAC permission", withBearerAuth: true, expectedLogsMatcher: SatisfyAll( - ContainSubstring("HTTP/1.1 403 Forbidden"), + SatisfyAny( + ContainSubstring("HTTP/1.1 403 Forbidden"), + ContainSubstring("HTTP/2 403"), + ), Not(ContainSubstring(`workqueue_work_duration_seconds_count`)), ), },