diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-03-13 15:03:54 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-03-13 15:06:05 +0100 |
commit | 70b5424b9987ca348a1da97cc1827e2286bbfe4b (patch) | |
tree | 0940c4c1cdf8d19a7b346aa138d3f760c785cb1a /src/garage/tests/common/custom_requester.rs | |
parent | 2687fb7fa80f645a2e29822d60e8970433788889 (diff) | |
download | garage-70b5424b9987ca348a1da97cc1827e2286bbfe4b.tar.gz garage-70b5424b9987ca348a1da97cc1827e2286bbfe4b.zip |
use one key per context to isolate teststests/increase-robustness
Diffstat (limited to 'src/garage/tests/common/custom_requester.rs')
-rw-r--r-- | src/garage/tests/common/custom_requester.rs | 9 |
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(), |