From dcad5bc82569d5d5055e683f9c31ce9b8f1c31c6 Mon Sep 17 00:00:00 2001 From: woksin Date: Thu, 12 Nov 2026 19:59:42 +0100 Subject: [PATCH] Require exactly 401 for the unauthenticated query stream in consumer e2e --- E2E/Client/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/E2E/Client/Program.cs b/E2E/Client/Program.cs index 7991c169..ac1facad 100644 --- a/E2E/Client/Program.cs +++ b/E2E/Client/Program.cs @@ -22,9 +22,9 @@ await Step("unauthenticated query stream is refused", async cancellation => { using var response = await http.GetAsync("/.cratis/queries/sse", HttpCompletionOption.ResponseHeadersRead, cancellation); - return response.StatusCode == HttpStatusCode.OK - ? throw new InvalidOperationException("an unauthenticated caller was served the query stream") - : $"status {(int)response.StatusCode}"; + return response.StatusCode == HttpStatusCode.Unauthorized + ? $"status {(int)response.StatusCode}" + : throw new InvalidOperationException($"an unauthenticated caller got status {(int)response.StatusCode} for the query stream, expected 401"); }); await Step("client credentials are exchanged for a token", async cancellation =>