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 <noreply@paperclip.ing>
This commit is contained in:
2026-04-26 01:12:05 +00:00
committed by Hugh Commit [agent]
parent 4c956cc039
commit e364e09113
+11
View File
@@ -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 });