diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index f78391d72f..d742ca1cc9 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -1,15 +1,4 @@ -function isDockerisedTest() { - return process.env.DOCKERISED_TEST === "true" -} - function isTest() { - if (isDockerisedTest()) { - // While we are migrating all the tests to use docker instead of mocked in memory, - // we want to keep treating the old tests as tests, - // but the new tests should not make a difference - return false - } - return isCypress() || isJest() } diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 50a1e187ba..177393dee7 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -74,7 +74,7 @@ server.on("close", async () => { await events.shutdown() await Thread.shutdown() api.shutdown() - if (!env.isTest() && !env.isDockerisedTest()) { + if (!env.isTest()) { process.exit(errCode) } }) diff --git a/packages/server/src/environment.ts b/packages/server/src/environment.ts index 99949feb41..6272e0e462 100644 --- a/packages/server/src/environment.ts +++ b/packages/server/src/environment.ts @@ -1,17 +1,6 @@ import { join } from "path" -function isDockerisedTest() { - return process.env.DOCKERISED_TEST === "true" -} - function isTest() { - if (isDockerisedTest()) { - // While we are migrating all the tests to use docker instead of mocked in memory, - // we want to keep treating the old tests as tests, - // but the new tests should not make a difference - return false - } - return isCypress() || isJest() } @@ -115,7 +104,6 @@ const environment = { isInThread: () => { return inThread }, - isDockerisedTest, } // threading can cause memory issues with node-ts in development diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index f12669f5e7..f98efb661f 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -168,14 +168,6 @@ class TestConfiguration { } if (this.allApps) { cleanup(this.allApps.map(app => app.appId)) - - if (env.isDockerisedTest()) { - await this._req( - null, - { appId: this.prodApp.appId }, - controllers.app.destroy - ) - } } if (this.server) { diff --git a/packages/worker/src/environment.ts b/packages/worker/src/environment.ts index aab30883ea..52fec210bc 100644 --- a/packages/worker/src/environment.ts +++ b/packages/worker/src/environment.ts @@ -4,17 +4,7 @@ function isDev() { return process.env.NODE_ENV !== "production" } -function isDockerisedTest() { - return process.env.DOCKERISED_TEST === "true" -} - function isTest() { - if (isDockerisedTest()) { - // While we are migrating all the tests to use docker instead of mocked in memory, - // we want to keep treating the old tests as tests, - // but the new tests should not make a difference - return false - } return ( process.env.NODE_ENV === "jest" || process.env.NODE_ENV === "cypress" ||