From e364e0911394635e90d4b574d10b1af66aafaa1e Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Sun, 26 Apr 2026 01:12:05 +0000 Subject: [PATCH] test: assert config.image overrides selfPod image in job manifest Locks in the existing override behavior so a future regression that reverts to a hardcoded image is caught immediately. Closes the investigation on FAR-90. Co-Authored-By: Paperclip --- src/server/job-manifest.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/job-manifest.test.ts b/src/server/job-manifest.test.ts index d88e0a0..94d17b8 100644 --- a/src/server/job-manifest.test.ts +++ b/src/server/job-manifest.test.ts @@ -44,6 +44,17 @@ describe("buildJobManifest", () => { expect(container?.image).toBe("paperclip/paperclip:latest"); }); + it("uses config.image when provided, overriding selfPod image", () => { + const ctxWithImage = { + ...mockCtx, + config: { image: "my-custom-image:v1.2.3" }, + }; + const result = buildJobManifest({ ctx: ctxWithImage, selfPod: mockSelfPod }); + + const container = result.job.spec?.template?.spec?.containers?.[0]; + expect(container?.image).toBe("my-custom-image:v1.2.3"); + }); + it("sets fsGroupChangePolicy to OnRootMismatch", () => { const result = buildJobManifest({ ctx: mockCtx, selfPod: mockSelfPod });