1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Use docker-compose dev for dev testing

This commit is contained in:
Adria Navarro 2023-01-24 11:02:58 +00:00
parent 4df4494d00
commit 53fa5d99b2
3 changed files with 27 additions and 20 deletions

View file

@ -1,12 +1,26 @@
module.exports = env => ({
devEnv: {
image: "budibase/dependencies",
tag: "latest",
ports: [6379, 5984, 9000],
env,
wait: {
type: "text",
text: "Test environment started...",
},
},
})
module.exports = dependenciesEnv => {
if (process.env.DEV_TOOLS) {
return {
dockerCompose: {
composeFilePath: `${__dirname}/hosting`,
composeFile: 'docker-compose.dev.yaml',
startupTimeout: 10000,
}
}
}
return {
devEnv: {
image: "budibase/dependencies",
tag: "latest",
ports: [6379, 5984, 9000],
env: dependenciesEnv,
wait: {
type: "text",
text: "Test environment started...",
},
}
}
}

View file

@ -1,7 +0,0 @@
JWT_SECRET=testsecret
COUCHDB_USER=test_couchdb_user
COUCH_DB_USER=test_couchdb_user
COUCHDB_PASSWORD=test_couchdb_password
COUCH_DB_PASSWORD=test_couchdb_password
MINIO_ACCESS_KEY=budibase
MINIO_SECRET_KEY=budibase

View file

@ -1,6 +1,6 @@
const { join } = require("path")
const { parsed: env } = require("dotenv").config({
path: join(__dirname, ".env.test"),
path: join(__dirname, "..", "..", "hosting", ".env"),
})
const jestTestcontainersConfigGenerator = require("../../jestTestcontainersConfigGenerator")