Skip to content

Commit

Permalink
Use docker-compose dev for dev testing
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinr committed Jan 24, 2023
1 parent dbdc3e8 commit ede31ef
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
38 changes: 26 additions & 12 deletions jestTestcontainersConfigGenerator.js
Original file line number Diff line number Diff line change
@@ -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...",
},
}
}
}
7 changes: 0 additions & 7 deletions packages/server/.env.test

This file was deleted.

2 changes: 1 addition & 1 deletion packages/server/jest-testcontainers-config.js
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit ede31ef

Please sign in to comment.