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/common | |
parent | 2bbe2da5adb044d3dfd7be22052cb2962318f9d5 (diff) | |
parent | 06369c8f4abcdedc1ae68e13f1045367674b5b45 (diff) | |
download | garage-0.8.3.tar.gz garage-0.8.3.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/common')
-rw-r--r-- | src/garage/tests/common/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/garage/tests/common/mod.rs b/src/garage/tests/common/mod.rs index 54efd1ea..1273bad1 100644 --- a/src/garage/tests/common/mod.rs +++ b/src/garage/tests/common/mod.rs @@ -1,6 +1,7 @@ use aws_sdk_s3::config::Region; use aws_sdk_s3::Client; use ext::*; +#[cfg(feature = "k2v")] use k2v_client::K2vClient; #[macro_use] @@ -21,6 +22,7 @@ pub struct Context { pub key: garage::Key, pub client: Client, pub custom_request: CustomRequester, + #[cfg(feature = "k2v")] pub k2v: K2VContext, } @@ -35,6 +37,7 @@ impl Context { let key = garage.key(None); let client = client::build_client(&key); let custom_request = CustomRequester::new_s3(garage, &key); + #[cfg(feature = "k2v")] let k2v_request = CustomRequester::new_k2v(garage, &key); Context { @@ -42,6 +45,7 @@ impl Context { client, key, custom_request, + #[cfg(feature = "k2v")] k2v: K2VContext { request: k2v_request, }, @@ -72,6 +76,7 @@ impl Context { } /// Build a K2vClient for a given bucket + #[cfg(feature = "k2v")] pub fn k2v_client(&self, bucket: &str) -> K2vClient { let config = k2v_client::K2vClientConfig { region: REGION.to_string(), |