From d539eee90b8f8973242e7d464c9bbd9b9ebdbe2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 22 Oct 2026 05:48:05 +0200 Subject: [PATCH] test(integration): expect the worker's own database in the environment check The environment check pinned the database a worker talks to as the single shared one. Each worker now runs against its own clone, so the check names the clone and asserts it is not the migrated template the clones copy. --- tests/integration/ci-environment.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/ci-environment.test.ts b/tests/integration/ci-environment.test.ts index 19b5cf3f9..06fb4c7d5 100644 --- a/tests/integration/ci-environment.test.ts +++ b/tests/integration/ci-environment.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { getPrismaClient } from "./setup"; +import { TEMPLATE_DATABASE, workerDatabaseName } from "./worker-database"; const TEST_ENCRYPTION_KEY = "0000000000000000000000000000000000000000000000000000000000000000"; @@ -22,6 +23,9 @@ describe("integration worker environment", () => { >` SELECT current_database() AS database_name `; - expect(rows).toEqual([{ database_name: "healthlog_test" }]); + // Each worker runs against its own clone, never the migrated template + // the clones are copied from. + expect(rows).toEqual([{ database_name: workerDatabaseName() }]); + expect(rows[0].database_name).not.toBe(TEMPLATE_DATABASE); }); });