Skip to content

Commit

Permalink
fix openai automation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shogunpurple committed Dec 4, 2024
1 parent 46bd790 commit 85b0a6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion packages/server/src/api/routes/tests/row.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3165,7 +3165,6 @@ if (descriptions.length) {
)
})

isInternal &&
describe("AI fields", () => {
let table: Table

Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/automations/tests/openai.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock("@budibase/pro", () => ({
ai: {
LargeLanguageModel: {
forCurrentTenant: jest.fn().mockImplementation(() => ({
initialised: true,
llm: {},
init: jest.fn(),
run: jest.fn(),
})),
Expand Down
24 changes: 12 additions & 12 deletions packages/server/src/integrations/tests/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ export type DatasourceProvider = () => Promise<Datasource | undefined>
export const { startContainer } = testContainerUtils

export enum DatabaseName {
POSTGRES = "postgres",
MONGODB = "mongodb",
MYSQL = "mysql",
SQL_SERVER = "mssql",
MARIADB = "mariadb",
ORACLE = "oracle",
// POSTGRES = "postgres",
// MONGODB = "mongodb",
// MYSQL = "mysql",
// SQL_SERVER = "mssql",
// MARIADB = "mariadb",
// ORACLE = "oracle",
SQS = "sqs",
}

const providers: Record<DatabaseName, DatasourceProvider> = {
[DatabaseName.POSTGRES]: postgres.getDatasource,
[DatabaseName.MONGODB]: mongodb.getDatasource,
[DatabaseName.MYSQL]: mysql.getDatasource,
[DatabaseName.SQL_SERVER]: mssql.getDatasource,
[DatabaseName.MARIADB]: mariadb.getDatasource,
[DatabaseName.ORACLE]: oracle.getDatasource,
// [DatabaseName.POSTGRES]: postgres.getDatasource,
// [DatabaseName.MONGODB]: mongodb.getDatasource,
// [DatabaseName.MYSQL]: mysql.getDatasource,
// [DatabaseName.SQL_SERVER]: mssql.getDatasource,
// [DatabaseName.MARIADB]: mariadb.getDatasource,
// [DatabaseName.ORACLE]: oracle.getDatasource,
[DatabaseName.SQS]: async () => undefined,
}

Expand Down

0 comments on commit 85b0a6c

Please sign in to comment.