fix(sundb): bundle the vendor JDBC driver so SunDB works out of the box

This commit is contained in:
zipg authored and GitHub committed 2026-09-30 15:39:21 +08:00
1 parent 20ffc62249
commit 4f4e2a790b
19 files changed
+81 -5

No files matched your search

@@ -0,0 +1,14 @@
import { describe, expect, it } from "vitest";
import { SUNDB_DEFAULT_JDBC_DRIVER_CLASS, sundbJdbcDriverClass } from "@/lib/database/sundbDriverOptions";
describe("sundb driver options", () => {
it("defaults the driver class to the vendor class bundled inside the Agent", () => {
expect(SUNDB_DEFAULT_JDBC_DRIVER_CLASS).toBe("csii.sundb.jdbc.SundbDriver");
expect(sundbJdbcDriverClass({})).toBe("csii.sundb.jdbc.SundbDriver");
expect(sundbJdbcDriverClass({ jdbc_driver_class: " " })).toBe("csii.sundb.jdbc.SundbDriver");
});
it("keeps an explicit driver class", () => {
expect(sundbJdbcDriverClass({ jdbc_driver_class: " com.example.SundbDriver " })).toBe("com.example.SundbDriver");
});
});