Files
OmniRoute/tests/unit/proxy-family-migration.test.ts
Diego Rodrigues de Sa e Souza 76a07cf7a5 Release v3.8.24 (#3747)
Release v3.8.24 — see CHANGELOG.md [3.8.24] for the full notes and the PR description for the contributors hall. Integration of release/v3.8.24 into main.
2026-06-13 17:27:40 -03:00

18 lines
861 B
TypeScript

import { describe, it, after } from "node:test";
import assert from "node:assert/strict";
import { getDbInstance, resetDbInstance } from "../../src/lib/db/core";
describe("migration 099 proxy family column", () => {
after(() => resetDbInstance());
it("adds a family column defaulting to 'auto' on proxy_registry", () => {
const db = getDbInstance();
const cols = db.prepare("PRAGMA table_info(proxy_registry)").all() as Array<{ name: string }>;
assert.ok(cols.some((c) => c.name === "family"), "proxy_registry.family must exist");
});
it("adds a family column on upstream_proxy_config", () => {
const db = getDbInstance();
const cols = db.prepare("PRAGMA table_info(upstream_proxy_config)").all() as Array<{ name: string }>;
assert.ok(cols.some((c) => c.name === "family"), "upstream_proxy_config.family must exist");
});
});