From 330bd74f3ace74f15966dfb2465191aa7c1ae5a6 Mon Sep 17 00:00:00 2001 From: Jorge Hermo Date: Sun, 3 Nov 2024 17:02:18 +0100 Subject: [PATCH] test: include gcs metadata deserialization in unit test --- core/src/services/gcs/backend.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/services/gcs/backend.rs b/core/src/services/gcs/backend.rs index b8cfa88970d..96c81aae824 100644 --- a/core/src/services/gcs/backend.rs +++ b/core/src/services/gcs/backend.rs @@ -628,7 +628,10 @@ mod tests { "etag": "CKWasoTgyPkCEAE=", "timeCreated": "2022-08-15T11:33:34.866Z", "updated": "2022-08-15T11:33:34.866Z", - "timeStorageClassUpdated": "2022-08-15T11:33:34.866Z" + "timeStorageClassUpdated": "2022-08-15T11:33:34.866Z", + "metadata" : { + "location" : "everywhere" + } }"#; let meta: GetObjectJsonResponse = @@ -639,5 +642,12 @@ mod tests { assert_eq!(meta.md5_hash, "fHcEH1vPwA6eTPqxuasXcg=="); assert_eq!(meta.etag, "CKWasoTgyPkCEAE="); assert_eq!(meta.content_type, "image/png"); + assert_eq!( + meta.metadata, + Some(HashMap::from_iter([( + "location".to_string(), + "everywhere".to_string() + )])) + ); } }