diff --git a/qa-core/src/integrations/validators/couch.spec.ts b/qa-core/src/integrations/validators/couch.spec.ts index 9a736b4b95..b0f4254610 100644 --- a/qa-core/src/integrations/validators/couch.spec.ts +++ b/qa-core/src/integrations/validators/couch.spec.ts @@ -1,7 +1,7 @@ import { GenericContainer } from "testcontainers" -import { generator } from "@budibase/backend-core/tests" import couchdb from "../../../../packages/server/src/integrations/couchdb" +import { generator } from "../../shared" describe("datasource validators", () => { describe("couchdb", () => { @@ -46,7 +46,9 @@ describe("datasource validators", () => { database: "random_db", }) const result = await integration.testConnection() - expect(result).toBe(false) + expect(result).toEqual({ + connected: false, + }) }) it("test invalid url", async () => { diff --git a/qa-core/src/integrations/validators/mongo.spec.ts b/qa-core/src/integrations/validators/mongo.spec.ts index ad09f1ffb7..a20b7cd7fa 100644 --- a/qa-core/src/integrations/validators/mongo.spec.ts +++ b/qa-core/src/integrations/validators/mongo.spec.ts @@ -61,7 +61,10 @@ describe("datasource validators", () => { tlsCAFile: "", }) const result = await integration.testConnection() - expect(result).toEqual({ error: "Authentication failed." }) + expect(result).toEqual({ + connected: false, + error: "Authentication failed.", + }) }) it("test invalid username", async () => { @@ -73,7 +76,10 @@ describe("datasource validators", () => { tlsCAFile: "", }) const result = await integration.testConnection() - expect(result).toEqual({ error: "Authentication failed." }) + expect(result).toEqual({ + connected: false, + error: "Authentication failed.", + }) }) it("test invalid connection", async () => { @@ -85,7 +91,10 @@ describe("datasource validators", () => { tlsCAFile: "", }) const result = await integration.testConnection() - expect(result).toEqual({ error: "Error: getaddrinfo ENOTFOUND http" }) + expect(result).toEqual({ + connected: false, + error: "Error: getaddrinfo ENOTFOUND http", + }) }) }) }) diff --git a/qa-core/src/integrations/validators/redis.spec.ts b/qa-core/src/integrations/validators/redis.spec.ts index 1c82e35b74..89ada2fe2d 100644 --- a/qa-core/src/integrations/validators/redis.spec.ts +++ b/qa-core/src/integrations/validators/redis.spec.ts @@ -36,6 +36,7 @@ describe("datasource validators", () => { }) const result = await integration.testConnection() expect(result).toEqual({ + connected: false, error: "WRONGPASS invalid username-password pair or user is disabled.", })