diff options
author | Alex <alex@adnab.me> | 2024-02-09 15:40:18 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2024-02-09 15:40:18 +0000 |
commit | 198188017cc7b956885e4b51c979cb3554276e4f (patch) | |
tree | 1aa2708656b02a856b3efd7e4d1c985c91c866ae /src/garage/tests/s3/objects.rs | |
parent | fe175fa8e2b7f8d2f719642b801d4ee101cb3289 (diff) | |
parent | 02e98e2d100a6af96369a72bc6979580424fe7df (diff) | |
download | garage-198188017cc7b956885e4b51c979cb3554276e4f.tar.gz garage-198188017cc7b956885e4b51c979cb3554276e4f.zip |
Merge pull request 'Implement header overriding in GetObject (fix #650)' (#713) from header-override-650 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/713
Diffstat (limited to 'src/garage/tests/s3/objects.rs')
-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] |