diff --git a/qa-core/.env b/qa-core/.env index be24fd2d28..0253ae346b 100644 --- a/qa-core/.env +++ b/qa-core/.env @@ -3,7 +3,4 @@ BB_ADMIN_USER_PASSWORD=budibase COUCH_DB_URL=http://budibase:budibase@localhost:4567 COUCH_DB_USER=budibase COUCH_DB_PASSWORD=budibase -JWT_SECRET=test -BUDIBASE_SERVER_URL=http://localhost:4100 -BUDIBASE_HOST= budirelease.live -BUDIBASE_ACCOUNTS_URL=https://account.budirelease.live \ No newline at end of file +JWT_SECRET=test \ No newline at end of file diff --git a/qa-core/.gitignore b/qa-core/.gitignore index 08660a00a8..3ff834abfc 100644 --- a/qa-core/.gitignore +++ b/qa-core/.gitignore @@ -3,3 +3,4 @@ node_modules/ watchtower-hook.json dist/ .testReport.json +testResults.json diff --git a/qa-core/package.json b/qa-core/package.json index 3f818b7aaa..4df423652c 100644 --- a/qa-core/package.json +++ b/qa-core/package.json @@ -18,10 +18,9 @@ "docker:down": "docker-compose down", "api:server:setup": "npm run docker:up && env-cmd ts-node ../packages/builder/ts/setup.ts", "api:server:setup:ci": "env-cmd node ../packages/builder/setup.js", + "api:test": "jest --runInBand --json --outputFile=testResults.json", "api:test:ci": "start-server-and-test api:server:setup:ci http://localhost:4100/builder test", - "api:test": "start-server-and-test api:server:setup http://localhost:4100/builder test", - "api:test:local": "env-cmd jest --runInBand --testPathIgnorePatterns=\\\"\\/dataSources\\/\\\"", - "api:test:nightly": "env-cmd jest --runInBand --json --outputFile=testResults.json" + "api:test:local": "start-server-and-test api:server:setup http://localhost:4100/builder test" }, "jest": { "preset": "ts-jest", diff --git a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts index 1c79f47609..26249b52f8 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts @@ -17,7 +17,7 @@ class InternalAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_HOST) { - throw new Error("Must set BUDIBASE_SERVER_URL env var") + throw new Error("Must set BUDIBASE_HOST env var") } this.host = `${env.BUDIBASE_HOST}/api` this.appId = appId diff --git a/qa-core/src/config/internal-api/TestConfiguration/accountsAPIClient.ts b/qa-core/src/config/internal-api/TestConfiguration/accountsAPIClient.ts index 9de03b75b6..2e9904797c 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/accountsAPIClient.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/accountsAPIClient.ts @@ -16,7 +16,7 @@ class AccountsAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_ACCOUNTS_URL) { - throw new Error("Must set BUDIBASE_SERVER_URL env var") + throw new Error("Must set BUDIBASE_ACCOUNTS_URL env var") } this.host = `${env.BUDIBASE_ACCOUNTS_URL}/api` this.appId = appId diff --git a/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts index 0dfe74bb6a..2074a9b475 100644 --- a/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts +++ b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts @@ -19,7 +19,7 @@ class PublicAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_HOST) { throw new Error( - "Must set BUDIBASE_PUBLIC_API_KEY and BUDIBASE_SERVER_URL env vars" + "Must set BUDIBASE_HOST env var" ) } this.host = `${env.BUDIBASE_HOST}/api/public/v1` diff --git a/qa-core/src/config/public-api/TestConfiguration/accountsAPIClient.ts b/qa-core/src/config/public-api/TestConfiguration/accountsAPIClient.ts index 2ea465adda..4a2961afb1 100644 --- a/qa-core/src/config/public-api/TestConfiguration/accountsAPIClient.ts +++ b/qa-core/src/config/public-api/TestConfiguration/accountsAPIClient.ts @@ -16,7 +16,7 @@ class AccountsAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_ACCOUNTS_URL) { - throw new Error("Must set BUDIBASE_SERVER_URL env var") + throw new Error("Must set BUDIBASE_ACCOUNTS_URL env var") } this.host = `${env.BUDIBASE_ACCOUNTS_URL}/api` this.appId = appId diff --git a/qa-core/src/environment.ts b/qa-core/src/environment.ts index e8119c3918..25d4c95057 100644 --- a/qa-core/src/environment.ts +++ b/qa-core/src/environment.ts @@ -1,5 +1,4 @@ const env = { - BUDIBASE_SERVER_URL: process.env.BUDIBASE_SERVER_URL, BUDIBASE_ACCOUNT_URL: process.env.BUDIBASE_ACCOUNT_URL, BUDIBASE_PUBLIC_API_KEY: process.env.BUDIBASE_PUBLIC_API_KEY, BUDIBASE_ACCOUNTS_URL: process.env.BUDIBASE_ACCOUNTS_URL,