Let the DB time to die before restarting for the unitest
@@ -209,7 +209,8 @@ deploy-grafana: $(BUILD_FOLDER)
deploy-monitoring: deploy-olm deploy-prometheus deploy-grafana
unit-test:
- docker stop postgres || true
+ docker kill postgres || true
+ sleep 3
docker run -d --rm --name postgres -e POSTGRES_PASSWORD=admin -e POSTGRES_USER=admin -p 127.0.0.1:5432:5432 postgres:12.3-alpine -c 'max_connections=10000'
until PGPASSWORD=admin pg_isready -U admin --dbname postgres --host 127.0.0.1 --port 5432; do sleep 1; done
SKIP_UT_DB=1 go test -v $(or ${TEST}, ${TEST}, $(shell go list ./... | grep -v subsystem)) -cover || (docker stop postgres && /bin/false)
