forked from bai/curriculum-project-hub
fix(hub): honor DATABASE_URL in integration test helpers
CI hub-check reaches Postgres as the service hostname `postgres`, but helpers hard-coded 127.0.0.1:5432, so migrate ran against the service while vitest connected to the wrong place. Prefer env when set.
This commit is contained in:
@@ -19,7 +19,9 @@ import type { FeishuRuntime } from "../../src/feishu/client.js";
|
|||||||
import type { ModelFactory } from "../../src/agent/runner.js";
|
import type { ModelFactory } from "../../src/agent/runner.js";
|
||||||
import { LocalSecretEnvelope } from "../../src/security/secretEnvelope.js";
|
import { LocalSecretEnvelope } from "../../src/security/secretEnvelope.js";
|
||||||
|
|
||||||
export const TEST_DATABASE_URL = "postgresql://paradigm:paradigm@127.0.0.1:5432/cph_hub_test";
|
export const TEST_DATABASE_URL =
|
||||||
|
process.env.DATABASE_URL?.trim() ||
|
||||||
|
"postgresql://paradigm:paradigm@127.0.0.1:5432/cph_hub_test";
|
||||||
export const DEFAULT_ORG_ID = "org_test_default";
|
export const DEFAULT_ORG_ID = "org_test_default";
|
||||||
export const TEST_SECRET_KEY_ID = "test-active";
|
export const TEST_SECRET_KEY_ID = "test-active";
|
||||||
export const TEST_SECRET_KEY = Buffer.alloc(32, "k");
|
export const TEST_SECRET_KEY = Buffer.alloc(32, "k");
|
||||||
|
|||||||
Reference in New Issue
Block a user