Get SQS plumbing working in tests.
This commit is contained in:
parent
8c3c341c55
commit
c5580b4767
|
@ -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",
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue