aboutsummaryrefslogtreecommitdiff
path: root/src/garage/tests/common/custom_requester.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-03-13 17:26:21 +0000
committerAlex <alex@adnab.me>2023-03-13 17:26:21 +0000
commitd6ffa57f4054c41c37a06686330e0080f8243430 (patch)
treee41175c99bee2bb6cc416f2b843fe55cf2c3ad98 /src/garage/tests/common/custom_requester.rs
parent7fcc153e7cfbae61626ca288634a0f4fb4c4b709 (diff)
parent70b5424b9987ca348a1da97cc1827e2286bbfe4b (diff)
downloadgarage-d6ffa57f4054c41c37a06686330e0080f8243430.tar.gz
garage-d6ffa57f4054c41c37a06686330e0080f8243430.zip
Merge pull request 'Increase Garage tests robustness' (#526) from tests/increase-robustness into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/526 Reviewed-by: Alex <alex@adnab.me> Reviewed-by: trinity-1686a <trinity.pointard@gmail.com>
Diffstat (limited to 'src/garage/tests/common/custom_requester.rs')
-rw-r--r--src/garage/tests/common/custom_requester.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/garage/tests/common/custom_requester.rs b/src/garage/tests/common/custom_requester.rs
index 1700cc90..609eda97 100644
--- a/src/garage/tests/common/custom_requester.rs
+++ b/src/garage/tests/common/custom_requester.rs
@@ -14,6 +14,7 @@ use garage_api::signature;
/// You should ever only use this to send requests AWS sdk won't send,
/// like to reproduce behavior of unusual implementations found to be
/// problematic.
+#[derive(Clone)]
pub struct CustomRequester {
key: Key,
uri: Uri,
@@ -22,18 +23,18 @@ pub struct CustomRequester {
}
impl CustomRequester {
- pub fn new_s3(instance: &Instance) -> Self {
+ pub fn new_s3(instance: &Instance, key: &Key) -> Self {
CustomRequester {
- key: instance.key.clone(),
+ key: key.clone(),
uri: instance.s3_uri(),
service: "s3",
client: Client::new(),
}
}
- pub fn new_k2v(instance: &Instance) -> Self {
+ pub fn new_k2v(instance: &Instance, key: &Key) -> Self {
CustomRequester {
- key: instance.key.clone(),
+ key: key.clone(),
uri: instance.k2v_uri(),
service: "k2v",
client: Client::new(),