mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Enhance internal payment handling and e2e testing setup
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { execFileSync, spawnSync } from "node:child_process";
|
||||
import { generateKeyPairSync } from "node:crypto";
|
||||
import { createHash, generateKeyPairSync } from "node:crypto";
|
||||
import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { createServer } from "node:net";
|
||||
import { dirname, join, resolve } from "node:path";
|
||||
@@ -25,7 +25,17 @@ import { fileURLToPath } from "node:url";
|
||||
const e2eDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const repoRoot = resolve(e2eDir, "..", "..");
|
||||
const stateFile = join(e2eDir, ".e2e-ports.json");
|
||||
const composeBase = ["compose", "-f", join(repoRoot, "docker-compose.e2e.yaml")];
|
||||
// Per-checkout compose project: parallel checkouts on one docker daemon
|
||||
// otherwise share the yaml's fixed `name:` and recreate/kill each other's
|
||||
// containers mid-run.
|
||||
const projectName = `edr-freight-e2e-${createHash("sha1").update(repoRoot).digest("hex").slice(0, 6)}`;
|
||||
const composeBase = [
|
||||
"compose",
|
||||
"-p",
|
||||
projectName,
|
||||
"-f",
|
||||
join(repoRoot, "docker-compose.e2e.yaml"),
|
||||
];
|
||||
|
||||
const DEFAULT_PORTS = {
|
||||
E2E_API_PORT: 3101,
|
||||
|
||||
Reference in New Issue
Block a user