From 15addbe94cbb3dc5b9b8e770d10cf14e01042c1a Mon Sep 17 00:00:00 2001 From: Trezy Date: Thu, 5 Mar 2026 11:30:56 -0600 Subject: [PATCH] test: fix e2e tests for NSID resolution --- tests/e2e_xrpc.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e_xrpc.rs b/tests/e2e_xrpc.rs index e87726c..605fd1f 100644 --- a/tests/e2e_xrpc.rs +++ b/tests/e2e_xrpc.rs @@ -172,7 +172,7 @@ async fn profile_with_mocked_services_returns_200() { #[tokio::test] #[serial] -async fn xrpc_get_unknown_method_returns_400() { +async fn xrpc_get_unknown_method_proxies_and_returns_bad_gateway() { let app = TestApp::new().await; let resp = app @@ -186,7 +186,9 @@ async fn xrpc_get_unknown_method_returns_400() { .await .unwrap(); - assert_eq!(resp.status(), StatusCode::BAD_REQUEST); + // Unknown methods are proxied to the resolved authority; DNS lookup + // failure for a nonsense NSID results in a 502 Bad Gateway. + assert_eq!(resp.status(), StatusCode::BAD_GATEWAY); } #[tokio::test] -- 2.51.2