Files
nocobase/tests/scripts/official-dialects.test.mjs
T
chenos 69e212ce3f refactor: move commercial database drivers to Pro (#10865)
* refactor: move commercial database drivers to Pro

* fix: preserve automatic loading of commercial database drivers

* test: align OSS fixtures with optional Pro drivers
2026-10-15 09:34:54 +08:00

27 lines
1.1 KiB
JavaScript

import assert from 'node:assert/strict';
import test from 'node:test';
import { OFFICIAL_DIALECTS } from '../../packages/app/app-server/src/database/resolve-config.ts';
import { dialects as smokeDialects } from '../../scripts/smoke-database-config.mjs';
import { databases as integrationDatabases } from '../../scripts/select-db-integration-matrix.mjs';
// Runtime loading includes optional Pro drivers. OSS smoke and integration jobs
// exercise only driver packages owned by this repository.
const commercialDialects = ['dameng', 'kingbase', 'oceanbase'];
const expected = OFFICIAL_DIALECTS.filter(
(dialect) => !commercialDialects.includes(dialect),
).sort();
test('the runtime retains automatic loading for all commercial dialects', () => {
for (const dialect of commercialDialects)
assert.ok(OFFICIAL_DIALECTS.includes(dialect));
});
test('the unreleased OSS smoke test offers every OSS runtime dialect', () => {
assert.deepEqual([...smokeDialects].sort(), expected);
});
test('OSS database integration CI covers every OSS runtime dialect', () => {
assert.deepEqual([...integrationDatabases].sort(), expected);
});