diff options
author | Alex <alex@adnab.me> | 2023-08-29 08:55:46 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-08-29 08:55:46 +0000 |
commit | 32e5686ad8354a2b2b37807ba6d7add73a6d23ee (patch) | |
tree | e1396dc9ddb11ec6728c3db94f71e349f3db10a8 /src/garage/tests/k2v | |
parent | 2bbe2da5adb044d3dfd7be22052cb2962318f9d5 (diff) | |
parent | 06369c8f4abcdedc1ae68e13f1045367674b5b45 (diff) | |
download | garage-32e5686ad8354a2b2b37807ba6d7add73a6d23ee.tar.gz garage-32e5686ad8354a2b2b37807ba6d7add73a6d23ee.zip |
Merge pull request 'Garage v0.8.3' (#619) from next-0.8 into mainv0.8.3
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/619
Diffstat (limited to 'src/garage/tests/k2v')
-rw-r--r-- | src/garage/tests/k2v/batch.rs | 2 | ||||
-rw-r--r-- | src/garage/tests/k2v/item.rs | 2 | ||||
-rw-r--r-- | src/garage/tests/k2v/mod.rs | 13 | ||||
-rw-r--r-- | src/garage/tests/k2v/poll.rs | 2 |
4 files changed, 3 insertions, 16 deletions
diff --git a/src/garage/tests/k2v/batch.rs b/src/garage/tests/k2v/batch.rs index 595d0ba8..71de91bf 100644 --- a/src/garage/tests/k2v/batch.rs +++ b/src/garage/tests/k2v/batch.rs @@ -6,7 +6,7 @@ use assert_json_diff::assert_json_eq; use base64::prelude::*; use serde_json::json; -use super::json_body; +use crate::json_body; use hyper::{Method, StatusCode}; #[tokio::test] diff --git a/src/garage/tests/k2v/item.rs b/src/garage/tests/k2v/item.rs index 588836c7..25d9cce4 100644 --- a/src/garage/tests/k2v/item.rs +++ b/src/garage/tests/k2v/item.rs @@ -6,7 +6,7 @@ use assert_json_diff::assert_json_eq; use base64::prelude::*; use serde_json::json; -use super::json_body; +use crate::json_body; use hyper::{Method, StatusCode}; #[tokio::test] diff --git a/src/garage/tests/k2v/mod.rs b/src/garage/tests/k2v/mod.rs index a009460e..241e3dc2 100644 --- a/src/garage/tests/k2v/mod.rs +++ b/src/garage/tests/k2v/mod.rs @@ -3,16 +3,3 @@ pub mod errorcodes; pub mod item; pub mod poll; pub mod simple; - -use hyper::{Body, Response}; - -pub async fn json_body(res: Response<Body>) -> serde_json::Value { - let res_body: serde_json::Value = serde_json::from_slice( - &hyper::body::to_bytes(res.into_body()) - .await - .unwrap() - .to_vec()[..], - ) - .unwrap(); - res_body -} diff --git a/src/garage/tests/k2v/poll.rs b/src/garage/tests/k2v/poll.rs index dd44aed9..452317c2 100644 --- a/src/garage/tests/k2v/poll.rs +++ b/src/garage/tests/k2v/poll.rs @@ -5,8 +5,8 @@ use std::time::Duration; use assert_json_diff::assert_json_eq; use serde_json::json; -use super::json_body; use crate::common; +use crate::json_body; #[tokio::test] async fn test_poll_item() { |