feat: add TestEngineInfo typing

This commit is contained in:
Nybkox
2025-01-28 20:27:56 +01:00
parent e7e57414b5
commit 516393856d
2 changed files with 82 additions and 0 deletions

View File

@@ -48,3 +48,4 @@ export * from './extensions';
export * from './alter-processor';
export * from './appdefs';
export * from './filter-type';
export * from './test-engines';

81
packages/types/test-engines.d.ts vendored Normal file
View File

@@ -0,0 +1,81 @@
import { ParameterInfo, SchedulerEventInfo, TriggerInfo } from './dbinfo';
export type TestObjectInfo = {
type: string;
create1: string;
create2: string;
drop1: string;
drop2: string;
};
export type TestEngineInfo = {
label: string;
connection: {
engine: string;
server?: string;
databaseUrl?: string;
serviceName?: string;
password?: string;
user?: string;
port?: number;
};
removeNotNull?: boolean;
skipOnCI?: boolean;
skipIncrementalAnalysis?: boolean;
skipDataModifications?: boolean;
skipReferences?: boolean;
skipIndexes?: boolean;
skipNullability?: boolean;
skipUnique?: boolean;
skipAutoIncrement?: boolean;
skipPkColumnTesting?: boolean;
skipDataDuplicator?: boolean;
skipStringLength?: boolean;
skipChangeColumn?: boolean;
skipDefaultValue?: boolean;
skipNonPkRename?: boolean;
skipPkDrop?: boolean;
skipOrderBy?: boolean;
alterTableAddColumnSyntax?: boolean;
dbSnapshotBySeconds?: boolean;
setNullDefaultInsteadOfDrop?: boolean;
supportRenameSqlObject?: boolean;
supportSchemas?: boolean;
defaultSchemaName?: string;
generateDbFile?: boolean;
dbSnapshotBySeconds?: boolean;
dumpFile?: string;
dumpChecks?: Array<{ sql: string; res: string }>;
parametersOtherSql?: string[];
parameters?: Array<{
testName: string;
create: string;
drop: string;
objectTypeField: string;
list: Array<Partial<ParameterInfo>>;
}>;
triggers?: Array<{
testName: string;
create: string;
drop: string;
triggerOtherCreateSql?: string;
triggerOtherDropSql?: string;
objectTypeField: string;
expected: Partial<TriggerInfo>;
}>;
schedulerEvents?: Array<{
create: string;
drop: string;
objectTypeField: string;
expected: Partial<SchedulerEventInfo>;
}>;
objects?: Array<TestObjectInfo>;
};