We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36bb210 commit 6d6ba74Copy full SHA for 6d6ba74
test/support/mongo.js
@@ -21,4 +21,8 @@ const Mongo = function Mongo(uri) {
21
22
inherits(Mongo, EventEmitter);
23
24
-module.exports = new Mongo('mongodb://mongo:27017/test');
+const addr = process.env.MONGO_PORT_27017_TCP_ADDR || 'mongo';
25
+const port = process.env.MONGO_PORT_27017_TCP_PORT || '27017';
26
+const db = 'test';
27
+
28
+module.exports = new Mongo(`mongodb://${addr}:${port}/${db}`);
test/support/redis.js
@@ -2,4 +2,7 @@
2
3
const Redis = require('ioredis');
4
5
-module.exports = new Redis(6379, 'redis');
+const addr = process.env.MONGO_PORT_27017_TCP_ADDR || 'redis';
6
+const port = process.env.MONGO_PORT_27017_TCP_PORT || '6379';
7
8
+module.exports = new Redis(port, addr);
0 commit comments