Skip to content

Commit acd54e0

Browse files
committed
Merge remote-tracking branch 'origin/fix/watch-mode-keepalive-tri-13065' into feat/query-safety-tri-11165
2 parents 3fa21ef + e4cd316 commit acd54e0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/webapp/test/dashboardAgentForeignChat.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const mocks = vi.hoisted(() => ({
66
}));
77

88
vi.mock("~/db.server", () => ({ $replica: {}, prisma: {} }));
9-
vi.mock("~/env.server", () => ({ env: { SESSION_SECRET: "test-session-secret" } }));
9+
// env.server is left real: the route transitively pulls in the ClickHouse client singleton,
10+
// which reads its URLs and tuning from the parsed env at import. A stubbed env starves those
11+
// (`Invalid URL`); the real schema fills them from CI's CLICKHOUSE_URL, same as every other
12+
// route test.
1013
vi.mock("~/services/session.server", () => ({
1114
requireUser: async () => ({ id: "usr_real", admin: false, isImpersonating: false }),
1215
}));

apps/webapp/test/dashboardAgentWatches.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ vi.mock("~/v3/canAccessDashboardAgent.server", () => ({
8989
// The routes drive the real service, which builds a TriggerClient from .env — so an unmocked
9090
// suite triggers actual runs against whatever origin .env names.
9191
vi.mock("@trigger.dev/sdk", async (importOriginal) => {
92-
const actual = await importOriginal<typeof import("@trigger.dev/sdk")>();
92+
const actual = await importOriginal<Record<string, unknown>>();
9393
return {
9494
...actual,
9595
TriggerClient: class {
@@ -108,6 +108,9 @@ process.env.SESSION_SECRET = SESSION_SECRET;
108108
// The agent's subscribe endpoint refuses without an email transport configured.
109109
process.env.ALERT_FROM_EMAIL = "alerts@example.com";
110110
process.env.ALERT_EMAIL_TRANSPORT = "smtp";
111+
// Arming a batch chain builds a (stubbed) client only when this is set; unset in CI, it would
112+
// no-op and the check test's trigger assertion would never see the batch task.
113+
process.env.DASHBOARD_AGENT_SECRET_KEY = "test-dashboard-agent-secret";
111114

112115
const {
113116
armDashboardAgentWatchBatch,

0 commit comments

Comments
 (0)