feat: add direct PostgreSQL and ACK deployment support
This commit is contained in:
14
tests/postgres-script-contract.test.ts
Normal file
14
tests/postgres-script-contract.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("PostgreSQL account script concurrency contract", () => {
|
||||
it("serializes bootstrap and legacy imports that target the same logical account", async () => {
|
||||
const [bootstrap, legacyImport] = await Promise.all([
|
||||
readFile(new URL("../scripts/bootstrap-admin.mjs", import.meta.url), "utf8"),
|
||||
readFile(new URL("../scripts/import-legacy-accounts.mjs", import.meta.url), "utf8")
|
||||
]);
|
||||
expect(bootstrap).toContain("pg_advisory_xact_lock");
|
||||
expect(legacyImport).toContain("pg_advisory_xact_lock(hashtextextended($1, 0))");
|
||||
expect(legacyImport).toContain("session_version=platform_users.session_version+1");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user