aboutsummaryrefslogtreecommitdiff
path: root/src/garage/tests/common
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-06-27 17:20:58 +0000
committerAlex <alex@adnab.me>2023-06-27 17:20:58 +0000
commite716320b0a5d255027cbfb6e726eec18b82fb86f (patch)
tree70f799635a601a66f2ccfa1762ed741a2e20070d /src/garage/tests/common
parente466edbaec0cb9710e937a7ac01f00f943b2c7d2 (diff)
parent76355453dd17bc4d7c7bd1b12bf502a8b334c888 (diff)
downloadgarage-e716320b0a5d255027cbfb6e726eec18b82fb86f.tar.gz
garage-e716320b0a5d255027cbfb6e726eec18b82fb86f.zip
Merge pull request 'cargo: roxmltree-0.18 and aws-sdk-s3-0.28 bump' (#591) from jpds/garage:roxmltree-0.18 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/591
Diffstat (limited to 'src/garage/tests/common')
-rw-r--r--src/garage/tests/common/client.rs11
-rw-r--r--src/garage/tests/common/mod.rs5
2 files changed, 9 insertions, 7 deletions
diff --git a/src/garage/tests/common/client.rs b/src/garage/tests/common/client.rs
index e9d4849a..ef4daa5d 100644
--- a/src/garage/tests/common/client.rs
+++ b/src/garage/tests/common/client.rs
@@ -1,15 +1,16 @@
-use aws_sdk_s3::{Client, Config, Credentials, Endpoint};
+use aws_sdk_s3::config::Credentials;
+use aws_sdk_s3::{Client, Config};
-use super::garage::{Instance, Key};
+use super::garage::Key;
+use crate::common::garage::DEFAULT_PORT;
-pub fn build_client(instance: &Instance, key: &Key) -> Client {
+pub fn build_client(key: &Key) -> Client {
let credentials = Credentials::new(&key.id, &key.secret, None, None, "garage-integ-test");
- let endpoint = Endpoint::immutable(instance.s3_uri());
let config = Config::builder()
+ .endpoint_url(format!("http://127.0.0.1:{}", DEFAULT_PORT))
.region(super::REGION)
.credentials_provider(credentials)
- .endpoint_resolver(endpoint)
.build();
Client::from_conf(config)
diff --git a/src/garage/tests/common/mod.rs b/src/garage/tests/common/mod.rs
index 0b8c6755..54efd1ea 100644
--- a/src/garage/tests/common/mod.rs
+++ b/src/garage/tests/common/mod.rs
@@ -1,4 +1,5 @@
-use aws_sdk_s3::{Client, Region};
+use aws_sdk_s3::config::Region;
+use aws_sdk_s3::Client;
use ext::*;
use k2v_client::K2vClient;
@@ -32,7 +33,7 @@ impl Context {
fn new() -> Self {
let garage = garage::instance();
let key = garage.key(None);
- let client = client::build_client(garage, &key);
+ let client = client::build_client(&key);
let custom_request = CustomRequester::new_s3(garage, &key);
let k2v_request = CustomRequester::new_k2v(garage, &key);