feat(db2): enable data transfers and field lineage
This commit is contained in:
9 files changed
+436
-21
No files matched your search
@@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { TransferOwnershipPreview, TransferRequest } from "@/lib/backend/api";
|
||||
import type { ConnectionConfig } from "@/types/database";
|
||||
import { useProductionSafetyStore } from "@/stores/productionSafetyStore";
|
||||
import { confirmTransferWithProductionSafety, createTransferSubmission, rebuildUnavailableReason, resolveTransferStrategy, transferStrategyOptions } from "../transferStrategy";
|
||||
import { confirmTransferWithProductionSafety, createTransferSubmission, rebuildUnavailableReason, resolveTransferStrategy, supportsTransferUpsert, transferStrategyOptions } from "../transferStrategy";
|
||||
|
||||
function deferred<T>() {
|
||||
let resolve!: (value: T) => void;
|
||||
@@ -70,6 +70,15 @@ describe("transfer strategies", () => {
|
||||
expect(resolveTransferStrategy({})).toBe("append");
|
||||
});
|
||||
|
||||
it("does not expose unimplemented DB2 upsert or rebuild strategies", () => {
|
||||
expect(supportsTransferUpsert("db2")).toBe(false);
|
||||
expect(rebuildUnavailableReason("structureAndData", "db2")).toBe("unsupported");
|
||||
expect(rebuildUnavailableReason("structureOnly", "db2")).toBe("unsupported");
|
||||
expect(supportsTransferUpsert("postgres")).toBe(true);
|
||||
expect(supportsTransferUpsert("mysql")).toBe(true);
|
||||
expect(supportsTransferUpsert(undefined)).toBe(true);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["dataOnly", "postgres", "dataOnly"],
|
||||
["structureAndData", "mongodb", "unsupported"],
|
||||
|
||||
Reference in new issue
Block a user