Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer committed May 14, 2024
1 parent 0d1ad10 commit 915bf81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ spec:
- script:
timeout: 10s
content: |
#!/bin/bash
set -eu
####
export MASTER_IP_FROM_SENTINEL=$(kubectl exec --namespace ${NAMESPACE} redis-sentinel-sentinel-0 -- redis-cli -p 26379 sentinel get-master-addr-by-name myMaster | head -n 1)
export MASTER_IP_FROM_LABEL=$(kubectl -n ${NAMESPACE} get pod -l app=redis-replication,redis-role=master,redis_setup_type=replication -o jsonpath='{.items[0].status.podIP}')
export MASTER_IP_FROM_SENTINEL=$(kubectl exec --namespace ${NAMESPACE} redis-sentinel-sentinel-0 -- redis-cli -p 26379 sentinel get-master-addr-by-name myMaster | head -n 1);
export MASTER_IP_FROM_LABEL=$(kubectl -n ${NAMESPACE} get pod -l app=redis-replication,redis-role=master,redis_setup_type=replication -o jsonpath='{.items[0].status.podIP}');
echo "MASTER_IP_FROM_SENTINEL: $MASTER_IP_FROM_SENTINEL";
echo "MASTER_IP_FROM_LABEL: $MASTER_IP_FROM_LABEL";
####
if [ "$MASTER_IP_FROM_SENTINEL" == "$MASTER_IP_FROM_LABEL" ]; then echo "OK"; else echo "FAIL"; fi
check:
Expand Down

0 comments on commit 915bf81

Please sign in to comment.