fix: fall back to converted extensions in object storage get
Some checks failed
CI / Check / Test (push) Failing after 6m36s
Some checks failed
CI / Check / Test (push) Failing after 6m36s
This commit is contained in:
@@ -130,7 +130,8 @@ async fn converts_jpeg_to_avif_and_swaps_key() {
|
||||
vec![("avatars/u1".into(), "avatars/u1.avif".into())]
|
||||
);
|
||||
assert!(storage.get("avatars/u1.avif").await.is_ok());
|
||||
assert!(storage.get("avatars/u1").await.is_err());
|
||||
// Old raw key deleted — fallback resolves to .avif, so get() still succeeds;
|
||||
// the swap assertion above proves the rename happened.
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -156,5 +157,4 @@ async fn converts_jpeg_to_webp_and_swaps_key() {
|
||||
vec![("avatars/u1".into(), "avatars/u1.webp".into())]
|
||||
);
|
||||
assert!(storage.get("avatars/u1.webp").await.is_ok());
|
||||
assert!(storage.get("avatars/u1").await.is_err());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user