Fix testing setup

This commit is contained in:
Andras Schmelczer 2026-04-01 22:36:22 +01:00
parent 0897f7a545
commit 3784418567
11 changed files with 266 additions and 119 deletions

View file

@ -40,8 +40,10 @@ export class ServerControl {
const reservation = await findFreePort();
this._port = reservation.port;
// Prefer tmpfs (/host/tmp) over disk-backed /tmp for faster SQLite I/O
const tmpBase = fs.existsSync("/host/tmp") ? "/host/tmp" : os.tmpdir();
this.tempDir = fs.mkdtempSync(
path.join(os.tmpdir(), "vault-link-test-")
path.join(tmpBase, "vault-link-test-")
);
const tempConfigPath = path.join(this.tempDir, "config.yml");
const dbDir = path.join(this.tempDir, "databases");