Skip to content

Commit c8b7162

Browse files
committed
another try to get redis to work in GHA
1 parent e8e4cab commit c8b7162

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"test": "jest --forceExit --runInBand --detectOpenHandles --verbose=false",
1212
"test-watch": "jest --watch --forceExit --runInBand --detectOpenHandles --verbose=false",
1313
"test-cache": "REDIS_FAKE=1 jest --runInBand --forceExit --detectOpenHandles",
14-
"test-rediscache": "REDIS_URL=redis://localhost:6379 CACHE_PREFIX=test jest --runInBand --forceExit --testPathIgnorePatterns=__test__/components/ __test__/containers __test__/cypress __test__/server/api/campaign/updateQuestionResponses.test.js --detectOpenHandles",
15-
"test-rediscache-contactcache": "REDIS_URL=redis://localhost:6379 CACHE_PREFIX=test REDIS_CONTACT_CACHE=1 jest --runInBand --forceExit --testPathIgnorePatterns=__test__/components/ __test__/containers __test__/cypress __test__/server/api/campaign/updateQuestionResponses.test.js --detectOpenHandles",
14+
"test-rediscache": "REDIS_URL=redis://127.0.0.1:6379 CACHE_PREFIX=test jest --runInBand --forceExit --testPathIgnorePatterns=__test__/components/ __test__/containers __test__/cypress __test__/server/api/campaign/updateQuestionResponses.test.js --detectOpenHandles",
15+
"test-rediscache-contactcache": "REDIS_URL=redis://127.0.0.1:6379 CACHE_PREFIX=test REDIS_CONTACT_CACHE=1 jest --runInBand --forceExit --testPathIgnorePatterns=__test__/components/ __test__/containers __test__/cypress __test__/server/api/campaign/updateQuestionResponses.test.js --detectOpenHandles",
1616
"test-cypress": "NODE_ENV=test DB_TYPE=pg DEFAULT_SERVICE=fakeservice SESSION_SECRET=secret DB_NAME=spoke_test DB_USER=spoke_test DB_PASSWORD=spoke_test cypress open",
1717
"test-sqlite": "jest --config jest.config.sqlite.js --runInBand --forceExit --detectOpenHandles",
1818
"test-coverage": "jest --coverage --detectOpenHandles --runInBand",

src/server/models/thinky.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if (redisUrl) {
4646
// new redis client doesn't respect username placeholders so replace it
4747
// this is especially true for legacy Heroku instances which had redis://h:<password>...
4848
const redisSettings = {
49-
url: redisUrl // redisUrl.replace(/redis:\/\/\w+:/, "redis://:")
49+
url: redisUrl.replace(/redis:\/\/\w+:/, "redis://:")
5050
};
5151
if (/rediss/.test(redisSettings.url)) {
5252
// secure redis protocol for Redis 6.0+
@@ -64,9 +64,9 @@ if (redisUrl) {
6464
const redis = require("redis");
6565
thinkyConn.r.redis = redis.createClient(redisSettings);
6666
(async () => {
67-
console.error("🐰 before");
67+
console.log("🐰 before", redisSettings.url);
6868
await thinkyConn.r.redis.connect();
69-
console.error("🐇 after");
69+
console.log("🐇 after");
7070
})();
7171
} else if (process.env.REDIS_FAKE) {
7272
const fakeredis = require("fakeredis");

0 commit comments

Comments
 (0)