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:
@@ -44,6 +44,17 @@ describe("buildJobManifest", () => {
|
|||||||
expect(container?.image).toBe("paperclip/paperclip:latest");
|
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", () => {
|
it("sets fsGroupChangePolicy to OnRootMismatch", () => {
|
||||||
const result = buildJobManifest({ ctx: mockCtx, selfPod: mockSelfPod });
|
const result = buildJobManifest({ ctx: mockCtx, selfPod: mockSelfPod });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user