diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-05 14:02:45 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-05 14:02:45 +0100 |
commit | 6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd (patch) | |
tree | a35c1c632a8cac2694eb8b614a5db3085d3a5e80 /src/garage/tests/s3/website.rs | |
parent | c0a7552015ff26ba542970449f1bc3df4ee9b173 (diff) | |
download | garage-6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd.tar.gz garage-6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd.zip |
[dep-upgrade-202402] update aws-sdk dependencies
Diffstat (limited to 'src/garage/tests/s3/website.rs')
-rw-r--r-- | src/garage/tests/s3/website.rs | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/garage/tests/s3/website.rs b/src/garage/tests/s3/website.rs index eeafb5fa..59c990f8 100644 --- a/src/garage/tests/s3/website.rs +++ b/src/garage/tests/s3/website.rs @@ -181,8 +181,18 @@ async fn test_website_s3_api() { .unwrap(); let conf = WebsiteConfiguration::builder() - .index_document(IndexDocument::builder().suffix("home.html").build()) - .error_document(ErrorDocument::builder().key("err/error.html").build()) + .index_document( + IndexDocument::builder() + .suffix("home.html") + .build() + .unwrap(), + ) + .error_document( + ErrorDocument::builder() + .key("err/error.html") + .build() + .unwrap(), + ) .build(); ctx.client @@ -201,9 +211,11 @@ async fn test_website_s3_api() { .allowed_methods("GET") .allowed_methods("PUT") .allowed_origins("*") - .build(), + .build() + .unwrap(), ) - .build(); + .build() + .unwrap(); ctx.client .put_bucket_cors() @@ -222,19 +234,16 @@ async fn test_website_s3_api() { .await .unwrap(); - let main_rule = cors_res.cors_rules().unwrap().iter().next().unwrap(); + let main_rule = cors_res.cors_rules().iter().next().unwrap(); assert_eq!(main_rule.id.as_ref().unwrap(), "main-rule"); assert_eq!( main_rule.allowed_headers.as_ref().unwrap(), &vec!["*".to_string()] ); + assert_eq!(&main_rule.allowed_origins, &vec!["*".to_string()]); assert_eq!( - main_rule.allowed_origins.as_ref().unwrap(), - &vec!["*".to_string()] - ); - assert_eq!( - main_rule.allowed_methods.as_ref().unwrap(), + &main_rule.allowed_methods, &vec!["GET".to_string(), "PUT".to_string()] ); } |