Consolidate E2E into e2e-tests/ (Dockerfile + compose.{visual,auth,oauth,full,devstack}.yml, WORKDIR /e2e-tests); move ci.sh to repo root
This commit is contained in:
+3
-3
@@ -11,14 +11,14 @@ import { readFileSync } from "node:fs";
|
||||
const read = (p: string) => readFileSync(new URL(`../${p}`, import.meta.url), "utf8");
|
||||
const compose = read("compose.yml");
|
||||
const override = read("compose.override.yml");
|
||||
const e2e = read("compose.e2e.yml");
|
||||
const visual = read("e2e-tests/compose.visual.yml");
|
||||
|
||||
// compose.yml lists web first, postgres second — slice the web service block.
|
||||
const webBlock = compose.slice(compose.indexOf("\n web:"), compose.indexOf("\n postgres:"));
|
||||
|
||||
test("every image is pinned to an exact version, never a floating tag", () => {
|
||||
// One scan over all compose files (postgres, the three Ory pairs, mailpit); web/e2e build.
|
||||
const images = [...[compose, override, e2e].join("\n").matchAll(/image:\s*(\S+)/g)].map((m) => m[1]!);
|
||||
const images = [...[compose, override, visual].join("\n").matchAll(/image:\s*(\S+)/g)].map((m) => m[1]!);
|
||||
assert.ok(images.length >= 8, "scans the pinned images");
|
||||
for (const img of images) {
|
||||
assert.match(img.split(":").at(-1)!, /^v?\d+\.\d+/, `${img} pins a version-like tag`);
|
||||
@@ -91,5 +91,5 @@ test("a one-shot bootstrap seeds the stack before web starts", () => {
|
||||
|
||||
test("the visual E2E does not drag in the Ory stack", () => {
|
||||
// web's Ory deps are reset for E2E (the dashboard is mock data — no Ory needed).
|
||||
assert.match(e2e, /depends_on:\s*!reset\b/, "E2E resets web's depends_on");
|
||||
assert.match(visual, /depends_on:\s*!reset\b/, "E2E resets web's depends_on");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user