crepererum commented on code in PR #691:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/691#discussion_r3196070757


##########
src/prefix.rs:
##########
@@ -321,6 +328,26 @@ mod tests {
         store.get(&head.location).await.unwrap();
     }
 
+    #[test]
+    fn strip_meta_preserves_version_and_etag() {
+        let prefix = Path::from("prefix");
+        let meta = ObjectMeta {
+            location: Path::from("prefix/foo"),
+            last_modified: chrono::DateTime::from_timestamp(1_700_000_000, 
0).unwrap(),
+            size: 42,
+            e_tag: Some("etag-value".to_string()),
+            version: Some("version-value".to_string()),
+        };
+
+        let stripped = strip_meta(&prefix, meta.clone());

Review Comment:
   similar to the actual `strip_meta` function, I would welcome if we 
future-proof this test a bit so new fields aren't forgotten:
   
   
   ```suggestion
           let ObjectMeta {location, last_modified, size, e_tag, version} = 
strip_meta(&prefix, meta.clone());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to