Skip to content

Commit

Permalink
test: include gcs metadata deserialization in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 committed Nov 3, 2024
1 parent b7a7c7e commit 330bd74
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/services/gcs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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()
)]))
);
}
}

0 comments on commit 330bd74

Please sign in to comment.