diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-09 15:34:42 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-09 15:58:46 +0100 |
commit | 02e98e2d100a6af96369a72bc6979580424fe7df (patch) | |
tree | da13072233d0da8f869d2c839fb486ce30e4b8cf /src/garage/tests | |
parent | 3865080c354427f913de6f2bb5e5b03f6231751c (diff) | |
download | garage-02e98e2d100a6af96369a72bc6979580424fe7df.tar.gz garage-02e98e2d100a6af96369a72bc6979580424fe7df.zip |
[header-override-650] implement header overriding in GetObject (fix #650)header-override-650
Diffstat (limited to 'src/garage/tests')
-rw-r--r-- | src/garage/tests/s3/objects.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/garage/tests/s3/objects.rs b/src/garage/tests/s3/objects.rs index ca35b435..ad5f63f1 100644 --- a/src/garage/tests/s3/objects.rs +++ b/src/garage/tests/s3/objects.rs @@ -185,6 +185,30 @@ async fn test_getobject() { assert_eq!(o.content_range.unwrap().as_str(), "bytes 57-61/62"); assert_bytes_eq!(o.body, &BODY[57..]); } + { + let exp = aws_sdk_s3::primitives::DateTime::from_secs(10000000000); + let o = ctx + .client + .get_object() + .bucket(&bucket) + .key(STD_KEY) + .response_content_type("application/x-dummy-test") + .response_cache_control("ccdummy") + .response_content_disposition("cddummy") + .response_content_encoding("cedummy") + .response_content_language("cldummy") + .response_expires(exp) + .send() + .await + .unwrap(); + assert_eq!(o.content_type.unwrap().as_str(), "application/x-dummy-test"); + assert_eq!(o.cache_control.unwrap().as_str(), "ccdummy"); + assert_eq!(o.content_disposition.unwrap().as_str(), "cddummy"); + assert_eq!(o.content_encoding.unwrap().as_str(), "cedummy"); + assert_eq!(o.content_language.unwrap().as_str(), "cldummy"); + assert_eq!(o.expires.unwrap(), exp); + assert_bytes_eq!(o.body, &BODY[..]); + } } #[tokio::test] |