aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/tests/bucket.rs4
-rw-r--r--src/garage/tests/common/client.rs11
-rw-r--r--src/garage/tests/common/mod.rs5
-rw-r--r--src/garage/tests/s3/multipart.rs4
-rw-r--r--src/garage/tests/s3/objects.rs4
-rw-r--r--src/garage/tests/s3/simple.rs2
-rw-r--r--src/garage/tests/s3/website.rs4
7 files changed, 18 insertions, 16 deletions
diff --git a/src/garage/tests/bucket.rs b/src/garage/tests/bucket.rs
index 0dec3cfa..83487bf8 100644
--- a/src/garage/tests/bucket.rs
+++ b/src/garage/tests/bucket.rs
@@ -1,7 +1,7 @@
use crate::common;
use crate::common::ext::CommandExt;
-use aws_sdk_s3::model::BucketLocationConstraint;
-use aws_sdk_s3::output::DeleteBucketOutput;
+use aws_sdk_s3::operation::delete_bucket::DeleteBucketOutput;
+use aws_sdk_s3::types::BucketLocationConstraint;
#[tokio::test]
async fn test_bucket_all() {
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);
diff --git a/src/garage/tests/s3/multipart.rs b/src/garage/tests/s3/multipart.rs
index 895a2993..aeff94b4 100644
--- a/src/garage/tests/s3/multipart.rs
+++ b/src/garage/tests/s3/multipart.rs
@@ -1,6 +1,6 @@
use crate::common;
-use aws_sdk_s3::model::{CompletedMultipartUpload, CompletedPart};
-use aws_sdk_s3::types::ByteStream;
+use aws_sdk_s3::primitives::ByteStream;
+use aws_sdk_s3::types::{CompletedMultipartUpload, CompletedPart};
const SZ_5MB: usize = 5 * 1024 * 1024;
const SZ_10MB: usize = 10 * 1024 * 1024;
diff --git a/src/garage/tests/s3/objects.rs b/src/garage/tests/s3/objects.rs
index 65f9e867..27697d45 100644
--- a/src/garage/tests/s3/objects.rs
+++ b/src/garage/tests/s3/objects.rs
@@ -1,6 +1,6 @@
use crate::common;
-use aws_sdk_s3::model::{Delete, ObjectIdentifier};
-use aws_sdk_s3::types::ByteStream;
+use aws_sdk_s3::primitives::ByteStream;
+use aws_sdk_s3::types::{Delete, ObjectIdentifier};
const STD_KEY: &str = "hello world";
const CTRL_KEY: &str = "\x00\x01\x02\x00";
diff --git a/src/garage/tests/s3/simple.rs b/src/garage/tests/s3/simple.rs
index f54ae9ac..41ec44c6 100644
--- a/src/garage/tests/s3/simple.rs
+++ b/src/garage/tests/s3/simple.rs
@@ -2,7 +2,7 @@ use crate::common;
#[tokio::test]
async fn test_simple() {
- use aws_sdk_s3::types::ByteStream;
+ use aws_sdk_s3::primitives::ByteStream;
let ctx = common::context();
let bucket = ctx.create_bucket("test-simple");
diff --git a/src/garage/tests/s3/website.rs b/src/garage/tests/s3/website.rs
index f61838e4..ab9b12b9 100644
--- a/src/garage/tests/s3/website.rs
+++ b/src/garage/tests/s3/website.rs
@@ -4,8 +4,8 @@ use crate::k2v::json_body;
use assert_json_diff::assert_json_eq;
use aws_sdk_s3::{
- model::{CorsConfiguration, CorsRule, ErrorDocument, IndexDocument, WebsiteConfiguration},
- types::ByteStream,
+ primitives::ByteStream,
+ types::{CorsConfiguration, CorsRule, ErrorDocument, IndexDocument, WebsiteConfiguration},
};
use http::{Request, StatusCode};
use hyper::{