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 => ({
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,
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")