From f02b659f35e3734e62058bfdb100a4eef30c65e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 13:03:45 +0000 Subject: [PATCH] test: fix vacuous assertion in mcp_http_tests test_auth_accepts_correct_token used assert_ne!(status, 401) which passes even on 500 errors. Replace with assert!(status.is_success()) so the test actually verifies the server accepts the correct token. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/mcp_http_tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/mcp_http_tests.rs b/tests/mcp_http_tests.rs index 17d556e2..64ffe0b9 100644 --- a/tests/mcp_http_tests.rs +++ b/tests/mcp_http_tests.rs @@ -236,7 +236,11 @@ fn test_auth_accepts_correct_token() { }), None, ); - assert_ne!(resp.status(), 401, "Correct API key should not be rejected"); + assert!( + resp.status().is_success(), + "Correct API key must be accepted with a 2xx response, got {}", + resp.status() + ); } #[test]