Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -37,6 +37,7 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { Prisma } from "../generated/prisma/client/client.js";
|
||||
import { createDbClient } from "./client.server.js";
|
||||
import { databaseTargetLabel, isDatabaseReachable } from "./database-reachable.js";
|
||||
import { publishOutboxEvent, type OutboxPublisherTransaction } from "./outbox.js";
|
||||
import { claimPendingOutboxEvents } from "./outbox-claim.js";
|
||||
import {
|
||||
@@ -48,8 +49,16 @@ const DATABASE_URL = process.env.DATABASE_URL?.trim();
|
||||
const integrationUrl =
|
||||
process.env.OUTBOX_E2E_DATABASE_URL?.trim() ||
|
||||
(DATABASE_URL && !DATABASE_URL.includes("example.invalid") ? DATABASE_URL : undefined);
|
||||
const skipIntegration = !integrationUrl;
|
||||
const describeIntegration = skipIntegration ? describe.skip : describe;
|
||||
|
||||
// A non-sentinel URL is necessary but not sufficient: the CI "Workspace
|
||||
// package tests" job injects a localhost DATABASE_URL without running a
|
||||
// Postgres service, so probe the server before connecting and skip (rather
|
||||
// than fail with P1001) when nothing is reachable.
|
||||
const databaseReachable = integrationUrl ? await isDatabaseReachable(integrationUrl) : false;
|
||||
if (integrationUrl && !databaseReachable) {
|
||||
console.warn(`[outbox-e2e] skipped: no database reachable at ${databaseTargetLabel(integrationUrl)}`);
|
||||
}
|
||||
const describeIntegration = databaseReachable ? describe : describe.skip;
|
||||
|
||||
const TEST_EVENT_TYPE = "audit.test.fired";
|
||||
const TEST_MARKER_TYPE = "audit.test.persisted";
|
||||
|
||||
Reference in new issue
Block a user