chore(CI): add password for redis cluster in actions

This commit is contained in:
zhanghongtong 2021-04-07 06:19:46 +00:00 committed by Rory Z
parent e44855bfb7
commit 0b904bb28b
4 changed files with 4 additions and 2 deletions

View File

@ -4,3 +4,4 @@ logfile /var/log/redis-server.log
tls-cert-file /tls/redis.crt
tls-key-file /tls/redis.key
tls-ca-cert-file /tls/ca.crt
requirepass public

View File

@ -1,3 +1,4 @@
daemonize yes
bind 0.0.0.0 ::
logfile /var/log/redis-server.log
requirepass public

View File

@ -80,7 +80,7 @@ do
continue;
fi
if [ "${node}" = "cluster" ] ; then
yes "yes" | redis-cli --cluster create "$LOCAL_IP:7000" "$LOCAL_IP:7001" "$LOCAL_IP:7002";
yes "yes" | redis-cli --cluster create "$LOCAL_IP:7000" "$LOCAL_IP:7001" "$LOCAL_IP:7002" --pass public --no-auth-warning;
elif [ "${node}" = "sentinel" ] ; then
cp /data/conf/sentinel.conf /_sentinel.conf
redis-server /_sentinel.conf --sentinel;

View File

@ -351,7 +351,6 @@ jobs:
if: matrix.node_type == 'single' && matrix.connect_type == 'tls'
run: |
cat <<-EOF >> "$GITHUB_ENV"
EMQX_AUTH__REIDS__PASSWORD=public
EMQX_AUTH__REDIS__TYPE=single
EMQX_AUTH__REDIS__SERVER=${redis_${{ matrix.network_type }}_address}:6380
EOF
@ -377,6 +376,7 @@ jobs:
- name: run test cases
run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
export EMQX_AUTH__REIDS__PASSWORD=public
printenv > .env
docker exec -i erlang sh -c "make ensure-rebar3"
docker exec -i erlang sh -c "./rebar3 eunit --dir apps/emqx_auth_redis"