Skip to content

Commit a19f3e7

Browse files
committed
[server] Start redis if not running
1 parent 932c19e commit a19f3e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"test:db": "cleanup() { echo 'Cleanup started'; yarn stop-services; }; trap cleanup EXIT; . $(leeway run components/gitpod-db:db-test-env) && yarn start-services && mocha --opts mocha.opts './**/*.spec.db.js' --exclude './node_modules/**'",
2323
"start-services": "yarn start-testdb && yarn start-redis && yarn start-spicedb",
2424
"stop-services": "yarn stop-redis && yarn stop-spicedb",
25-
"start-testdb": "if netstat -tuln | grep ':23306 '; then echo 'Mysql is already running.'; else leeway run components/gitpod-db:init-testdb; fi",
25+
"start-testdb": "leeway run components/gitpod-db:init-testdb",
2626
"start-spicedb": "leeway run components/spicedb:start-spicedb",
2727
"stop-spicedb": "leeway run components/spicedb:stop-spicedb",
28-
"start-redis": "if netstat -tuln | grep ':6379 '; then echo 'Redis is already running.'; else docker run --rm --name test-redis -p 6379:6379 -d redis; fi",
28+
"start-redis": "if redis-cli -h ${REDIS_HOST:-0.0.0.0} -e ping; then echo 'Redis is already running.'; else docker run --rm --name test-redis -p 6379:6379 -d redis; fi",
2929
"stop-redis": "docker stop test-redis || true",
3030
"telepresence": "telepresence --swap-deployment server --method inject-tcp --run yarn start-inspect"
3131
},

0 commit comments

Comments
 (0)