aboutsummaryrefslogtreecommitdiff
path: root/src/garage/tests/common/client.rs
diff options
context:
space:
mode:
authorJonathan Davies <jpds@protonmail.com>2023-05-05 21:18:29 +0100
committerJonathan Davies <jpds@protonmail.com>2023-06-25 21:31:35 +0100
commit7f8bf2d801c55e15b5056ae08cd443325f7989b8 (patch)
tree48f23d2d4e17e5c68820923033699d604ab032aa /src/garage/tests/common/client.rs
parent4297233d3e4aea1760d81de747ad3468553be41b (diff)
downloadgarage-7f8bf2d801c55e15b5056ae08cd443325f7989b8.tar.gz
garage-7f8bf2d801c55e15b5056ae08cd443325f7989b8.zip
src/garage/tests: Updated types for aws-sdk-s3 bump.
Diffstat (limited to 'src/garage/tests/common/client.rs')
-rw-r--r--src/garage/tests/common/client.rs11
1 files changed, 6 insertions, 5 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)