1
0
Fork 0
mirror of synced 2024-04-30 02:22:32 +12:00

Get SQS plumbing working in tests.

This commit is contained in:
Sam Rose 2024-04-09 15:31:32 +01:00
parent 8c3c341c55
commit c5580b4767
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -14,7 +14,7 @@ export default async function setup() {
try {
let couchdb = new GenericContainer("budibase/couchdb:v3.2.1-sqs")
.withExposedPorts(5984)
.withExposedPorts(5984, 4984)
.withEnvironment({
COUCHDB_PASSWORD: "budibase",
COUCHDB_USER: "budibase",

View file

@ -77,9 +77,15 @@ export function setupEnv(...envs: any[]) {
throw new Error("CouchDB port not found")
}
const couchSqlPort = getExposedV4Port(couch, 4984)
if (!couchSqlPort) {
throw new Error("CouchDB SQL port not found")
}
const configs = [
{ key: "COUCH_DB_PORT", value: `${couchPort}` },
{ key: "COUCH_DB_URL", value: `http://127.0.0.1:${couchPort}` },
{ key: "COUCH_DB_SQL_URL", value: `http://127.0.0.1:${couchSqlPort}` },
]
for (const config of configs.filter(x => !!x.value)) {