feat(opengauss): support A-compatibility packages
This commit is contained in:
1 parent
760cad6d1b
commit
deb47df2eb
28 files changed
+1706
-139
No files matched your search
@@ -130,6 +130,15 @@ describe("databaseObjectCapabilities", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("exposes packages only for openGauss A compatibility mode", () => {
|
||||
expect(sidebarObjectKindsForDatabase("opengauss", "A")).toEqual(expect.arrayContaining(["PACKAGE", "PACKAGE_BODY"]));
|
||||
expect(sidebarObjectKindsForDatabase("opengauss", "a")).toContain("PACKAGE");
|
||||
for (const mode of ["B", "C", "PG", undefined]) {
|
||||
expect(sidebarObjectKindsForDatabase("opengauss", mode), String(mode)).not.toContain("PACKAGE");
|
||||
}
|
||||
expect(databaseObjectCapabilities("opengauss", "A").sourceReadable).toEqual(expect.arrayContaining(["PACKAGE", "PACKAGE_BODY"]));
|
||||
});
|
||||
|
||||
it("enables custom type details only for verified PG-family databases", () => {
|
||||
for (const dbType of ["postgres", "opengauss", "gaussdb", "kingbase", "vastbase"] as const) {
|
||||
expect(customTypeCapabilities(dbType), dbType).toEqual({ details: true, members: true, ddl: true });
|
||||
|
||||
@@ -17,6 +17,11 @@ describe("buildDatabaseTreeNodes", () => {
|
||||
expect(node.id).toBe("conn-1:analytics");
|
||||
});
|
||||
|
||||
it("carries database compatibility mode into database nodes", () => {
|
||||
const [node] = buildDatabaseTreeNodes("conn-1", [{ name: "oracle_mode", compatibility_mode: "A" }]);
|
||||
expect(node.compatibilityMode).toBe("A");
|
||||
});
|
||||
|
||||
it("shortens the Cloud Spanner label but keeps the resource path as the node identity", () => {
|
||||
const [node] = buildDatabaseTreeNodes("conn-1", databases(SPANNER_PATH), { displayLabel: spannerDisplayDatabase });
|
||||
|
||||
|
||||
Reference in new issue
Block a user