Build and test / Tests and license checks (push) Has been cancelled
Build and test / OpenWrt 24.10.7 · x86-64 (push) Has been cancelled
Build and test / OpenWrt 25.12.4 · x86-64 (push) Has been cancelled
Build and test / OpenWrt 24.10.7 · ipq40xx-generic (push) Has been cancelled
Build and test / OpenWrt 25.12.4 · ipq40xx-generic (push) Has been cancelled
Build and test / OpenWrt 24.10.7 · mediatek-filogic (push) Has been cancelled
Build and test / OpenWrt 25.12.4 · mediatek-filogic (push) Has been cancelled
Build and test / OpenWrt 24.10.7 · ath79-generic (push) Has been cancelled
Build and test / OpenWrt 25.12.4 · ath79-generic (push) Has been cancelled
Build and test / OpenWrt 24.10.7 · ramips-mt7621 (push) Has been cancelled
Build and test / OpenWrt 25.12.4 · ramips-mt7621 (push) Has been cancelled
Build and test / Publish agent GitHub release assets (push) Has been cancelled
Build and test / Publish signed package repository (push) Has been cancelled
Release server / Test and build server image (push) Has been cancelled
31 lines
946 B
JavaScript
31 lines
946 B
JavaScript
const { spawn } = require("node:child_process");
|
|
const fs = require("node:fs");
|
|
const path = require("node:path");
|
|
|
|
const databasePath = path.join(process.cwd(), "test-results", "rmm-e2e.db");
|
|
fs.mkdirSync(path.dirname(databasePath), { recursive: true });
|
|
for (const suffix of ["", "-shm", "-wal"]) {
|
|
fs.rmSync(`${databasePath}${suffix}`, { force: true });
|
|
}
|
|
|
|
const server = spawn("go", ["run", "./server/cmd/rmm-server"], {
|
|
cwd: process.cwd(),
|
|
env: {
|
|
...process.env,
|
|
RMM_ADDR: ":18081",
|
|
RMM_DB_PATH: databasePath,
|
|
RMM_INSECURE_DEV_MODE: "true",
|
|
RMM_COOKIE_SECURE: "false",
|
|
RMM_WEB_DIR: "web",
|
|
RMM_OPERATOR_USERNAME: "e2e-admin",
|
|
RMM_OPERATOR_PASSWORD: "e2e-password-long-enough",
|
|
RMM_OPERATOR_TOKEN: "e2e-operator-token",
|
|
},
|
|
stdio: "inherit",
|
|
});
|
|
|
|
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
process.on(signal, () => server.kill(signal));
|
|
}
|
|
server.on("exit", (code) => process.exit(code ?? 1));
|