test(docker): derive image contract from pinned Node version
This commit is contained in:
1 parent
fec8dd3c5d
commit
d9ea93a2e7
1 file changed
+2
-1
@@ -37,7 +37,8 @@ it("passes a compiled release to both the application build and final image", ()
|
|||||||
expect(dockerfile).toContain(
|
expect(dockerfile).toContain(
|
||||||
'LABEL org.opencontainers.image.revision="$NEXT_DEPLOYMENT_ID"',
|
'LABEL org.opencontainers.image.revision="$NEXT_DEPLOYMENT_ID"',
|
||||||
);
|
);
|
||||||
expect(dockerfile.match(/FROM node:26\.8\.1-alpine/g)).toHaveLength(2);
|
const pinnedNode = readFileSync(".nvmrc", "utf8").trim();
|
||||||
|
expect(dockerfile.split(`FROM node:${pinnedNode}-alpine`).length - 1).toBe(2);
|
||||||
const compose = readFileSync("docker-compose.yml", "utf8");
|
const compose = readFileSync("docker-compose.yml", "utf8");
|
||||||
// biome-ignore lint/suspicious/noTemplateCurlyInString: Docker Compose interpolation, not JavaScript.
|
// biome-ignore lint/suspicious/noTemplateCurlyInString: Docker Compose interpolation, not JavaScript.
|
||||||
expect(compose).toContain("NEXT_DEPLOYMENT_ID: ${CMS_RELEASE:-unknown}");
|
expect(compose).toContain("NEXT_DEPLOYMENT_ID: ${CMS_RELEASE:-unknown}");
|
||||||
|
|||||||
Reference in new issue
Block a user