diff --git a/ci/platform.env b/ci/platform.env index 11d2d1e..cc21730 100644 --- a/ci/platform.env +++ b/ci/platform.env @@ -2,4 +2,4 @@ # remains reachable after its branch is deleted; the full commit pin makes the checkout immutable. EKKLESIA_PLATFORM_REPOSITORY=https://git.riverofglorymn.org/River_of_Glory_Church/Ekklesia.git EKKLESIA_PLATFORM_REF=refs/pull/90/head -EKKLESIA_PLATFORM_COMMIT=6e64b3c5f955452b41dbf1aac4c5557841d1ff8a +EKKLESIA_PLATFORM_COMMIT=a0e9948820a4e9b30b207ca3a0a98b3204eb8493 diff --git a/src/server/images/processing.ts b/src/server/images/processing.ts index 2236d62..79b2482 100644 --- a/src/server/images/processing.ts +++ b/src/server/images/processing.ts @@ -177,10 +177,11 @@ export async function processSignageImage(bytes: Uint8Array): Promise { expect(store.images.size).toBe(0); }); + it("recognizes a sanitized storage failure from the host's separate SDK copy", async () => { + const bucket = storage.bucket("native-images"); + const externalError = Object.assign(new Error("The storage service could not be reached."), { + code: "STORAGE_PROVIDER_UNAVAILABLE", + name: "ModuleStorageError", + }); + const externalStorage: ModuleStorage = { + bucket: () => ({ ...bucket, put: () => Promise.reject(externalError) }), + buckets: () => ["native-images"], + }; + + await expectSignageCode( + ingestNativeImage({ + bytes: await makeImage({ format: "png", height: 360, width: 640 }), + displayName: "welcome.png", + expiresAt: null, + filename: "welcome.png", + storage: externalStorage, + store, + }), + "SIGNAGE_STORAGE_UNAVAILABLE", + ); + }); + it("treats a race with an identical upload as a success rather than a failure", async () => { const bytes = await makeImage({ format: "png", height: 1080, width: 1920 }); const first = await ingest(bytes);