From 08a2e77871d66d7db2fb1f0e8e1e9ec0a5a4a0fd Mon Sep 17 00:00:00 2001 From: adrinr Date: Mon, 30 Jan 2023 18:18:23 +0000 Subject: [PATCH] Fix jest.setup --- packages/backend-core/tests/jestSetup.ts | 10 ++++++---- packages/server/src/tests/jestSetup.ts | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/backend-core/tests/jestSetup.ts b/packages/backend-core/tests/jestSetup.ts index d80624947b..35e99ec919 100644 --- a/packages/backend-core/tests/jestSetup.ts +++ b/packages/backend-core/tests/jestSetup.ts @@ -2,13 +2,15 @@ import env from "../src/environment" const globalSafe = global as any -env._set("COUCH_DB_PORT", globalSafe.__TESTCONTAINERS_DEVENV_PORT_5984__) +env._set( + "COUCH_DB_PORT", + globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_PORT_5984__"] +) env._set( "COUCH_DB_URL", - `http://${globalSafe.__TESTCONTAINERS_DEVENV_IP__}:${globalSafe.__TESTCONTAINERS_DEVENV_PORT_5984__}` + `http://${globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_IP__"]}:${globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_PORT_5984__"]}` ) - env._set( "MINIO_URL", - `http://${globalSafe.__TESTCONTAINERS_DEVENV_IP__}:${globalSafe.__TESTCONTAINERS_DEVENV_PORT_9000__}` + `http://${globalSafe["__TESTCONTAINERS_MINIO-SERVICE-1_IP__"]}:${globalSafe["__TESTCONTAINERS_MINIO-SERVICE-1_PORT_9000__"]}` ) diff --git a/packages/server/src/tests/jestSetup.ts b/packages/server/src/tests/jestSetup.ts index c97d2ae69d..7446dfb8ea 100644 --- a/packages/server/src/tests/jestSetup.ts +++ b/packages/server/src/tests/jestSetup.ts @@ -21,14 +21,14 @@ const globalSafe = global as any overrideConfigValue( "COUCH_DB_PORT", - globalSafe.__TESTCONTAINERS_DEVENV_PORT_5984__ + globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_PORT_5984__"] ) overrideConfigValue( "COUCH_DB_URL", - `http://${globalSafe.__TESTCONTAINERS_DEVENV_IP__}:${globalSafe.__TESTCONTAINERS_DEVENV_PORT_5984__}` + `http://${globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_IP__"]}:${globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_PORT_5984__"]}` ) overrideConfigValue( "MINIO_URL", - `http://${globalSafe.__TESTCONTAINERS_DEVENV_IP__}:${globalSafe.__TESTCONTAINERS_DEVENV_PORT_9000__}` + `http://${globalSafe["__TESTCONTAINERS_MINIO-SERVICE-1_IP__"]}:${globalSafe["__TESTCONTAINERS_MINIO-SERVICE-1_PORT_9000__"]}` )