Fix jest.setup

This commit is contained in:
adrinr 2023-01-30 18:18:23 +00:00
parent b2db582f02
commit 08a2e77871
2 changed files with 9 additions and 7 deletions

View File

@ -2,13 +2,15 @@ import env from "../src/environment"
const globalSafe = global as any 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( env._set(
"COUCH_DB_URL", "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( env._set(
"MINIO_URL", "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__"]}`
) )

View File

@ -21,14 +21,14 @@ const globalSafe = global as any
overrideConfigValue( overrideConfigValue(
"COUCH_DB_PORT", "COUCH_DB_PORT",
globalSafe.__TESTCONTAINERS_DEVENV_PORT_5984__ globalSafe["__TESTCONTAINERS_COUCHDB-SERVICE-1_PORT_5984__"]
) )
overrideConfigValue( overrideConfigValue(
"COUCH_DB_URL", "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( overrideConfigValue(
"MINIO_URL", "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__"]}`
) )