diff options
author | Alex <alex@adnab.me> | 2022-10-18 14:20:44 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2022-10-18 14:20:44 +0000 |
commit | 5670599372f6c3c60dcd74279a0741248fc510c3 (patch) | |
tree | 2852a5e3cf2a0d1728b7d67e59e1b13aaae92287 /src/garage/tests/k2v/poll.rs | |
parent | 7bc9fd34b250384d1b80ed28dc6c9e6abcda69ae (diff) | |
parent | f1c96d108c29ae4ef7b1f7ed8f2c06b6a5744909 (diff) | |
download | garage-5670599372f6c3c60dcd74279a0741248fc510c3.tar.gz garage-5670599372f6c3c60dcd74279a0741248fc510c3.zip |
Merge pull request 'Use status code 204 No Content for empty responses' (#403) from tobikris/garage:http-no-content into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/403
Diffstat (limited to 'src/garage/tests/k2v/poll.rs')
-rw-r--r-- | src/garage/tests/k2v/poll.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/garage/tests/k2v/poll.rs b/src/garage/tests/k2v/poll.rs index 70dc0410..e56705ae 100644 --- a/src/garage/tests/k2v/poll.rs +++ b/src/garage/tests/k2v/poll.rs @@ -1,4 +1,4 @@ -use hyper::Method; +use hyper::{Method, StatusCode}; use std::time::Duration; use crate::common; @@ -20,7 +20,7 @@ async fn test_poll() { .send() .await .unwrap(); - assert_eq!(res.status(), 200); + assert_eq!(res.status(), StatusCode::NO_CONTENT); // Retrieve initial value to get its causality token let res2 = ctx @@ -33,7 +33,7 @@ async fn test_poll() { .send() .await .unwrap(); - assert_eq!(res2.status(), 200); + assert_eq!(res2.status(), StatusCode::OK); let ct = res2 .headers() .get("x-garage-causality-token") @@ -80,7 +80,7 @@ async fn test_poll() { .send() .await .unwrap(); - assert_eq!(res.status(), 200); + assert_eq!(res.status(), StatusCode::NO_CONTENT); // Check poll finishes with correct value let poll_res = tokio::select! { @@ -88,7 +88,7 @@ async fn test_poll() { res = poll => res.unwrap().unwrap(), }; - assert_eq!(poll_res.status(), 200); + assert_eq!(poll_res.status(), StatusCode::OK); let poll_res_body = hyper::body::to_bytes(poll_res.into_body()) .await |