From 8b0bd487558e661f192484aacb1c08e4d1ed76e2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 30 Oct 2026 08:55:53 -0700 Subject: [PATCH] seaweed-volume: pin the read-only write status to 409 in the test (#12244) * seaweed-volume: pin the read-only write status to 409 in the test PR #12236 moved read-only upload refusals from 500 to CONFLICT with the refused-before-append proof; the test still asserted Go's 500 for the write. Deletes on a read-only volume keep surfacing 500. * seaweed-volume: correct the read-only status comment in the test Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- seaweed-volume/tests/http_integration.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seaweed-volume/tests/http_integration.rs b/seaweed-volume/tests/http_integration.rs index b90234a5ad..2b09cdff58 100644 --- a/seaweed-volume/tests/http_integration.rs +++ b/seaweed-volume/tests/http_integration.rs @@ -482,8 +482,8 @@ async fn delete_then_get_returns_404() { ); } -// Go answers both with 500 and an error containing "volume N is read only" -// (the write behind "failed to write to local disk: "). +// Go and Rust return 409 for read-only upload refusals; +// the delete still returns 500. #[tokio::test] async fn write_and_delete_on_read_only_volume_say_is_read_only() { let (state, _tmp) = test_state(); @@ -520,7 +520,7 @@ async fn write_and_delete_on_read_only_volume_say_is_read_only() { .oneshot(request("POST", b"refused")) .await .unwrap(); - assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR); + assert_eq!(response.status(), StatusCode::CONFLICT); let error = error_of(body_bytes(response).await); assert!(error.contains("volume 1 is read only"), "{error}");