feat: complete catalog fleet management workflow

This commit is contained in:
Codex
2026-08-31 15:58:43 +02:00
parent 866aee4249
commit 9c697dc062
56 changed files with 6692 additions and 611 deletions
+6
View File
@@ -1,7 +1,13 @@
import { getCatalogMetrics } from "../api/catalog-databases";
import { checkDwhHealth } from "../api/sessions";
import { emptyCatalogMetricsFixture } from "./msw";
// Catches shared browser test fixtures drifting from the same-origin /api contract and
// attempting real localhost network requests instead of using MSW.
test("the shared MSW health fixture follows the browser same-origin API contract", async () => {
await expect(checkDwhHealth()).resolves.toEqual({ ok: true, detail: "ok" });
});
test("the shared MSW catalog fixture exposes a valid empty metrics response", async () => {
await expect(getCatalogMetrics()).resolves.toEqual(emptyCatalogMetricsFixture);
});
+17
View File
@@ -1,5 +1,20 @@
import { setupServer } from "msw/node";
import { http, HttpResponse } from "msw";
import type { CatalogMetrics } from "../api/catalog-databases";
export const emptyCatalogMetricsFixture = {
scope: "global",
databaseId: null,
tables: 0,
columns: 0,
sensitiveColumns: 0,
relationships: 0,
descriptionTargets: 0,
describedTargets: 0,
descriptionCoverage: 0,
updatedAt: null,
} satisfies CatalogMetrics;
export const server = setupServer(
http.get("/api/auth/config", () => HttpResponse.json({ mode: "local", localLogin: true, oidcLogin: false })),
http.get("/api/me", () => HttpResponse.json({
@@ -11,6 +26,8 @@ export const server = setupServer(
})),
http.get("/api/health/dwh", () => HttpResponse.json({ ok: true, detail: "ok" })),
http.get("/api/catalog/databases", () => HttpResponse.json([])),
http.get("/api/catalog/metrics", () => HttpResponse.json(emptyCatalogMetricsFixture)),
http.get("/api/catalog/metadata-generation/models", () => HttpResponse.json({ models: [], default: null })),
http.get("/api/catalog/description-generation-runs", () => HttpResponse.json([])),
http.get("/api/catalog/sensitive-data-suggestion-runs", () => HttpResponse.json([])),
);