From 915bf81ed59c6d4cbb10887188cb34acf0a9d370 Mon Sep 17 00:00:00 2001 From: drivebyer Date: Tue, 14 May 2024 16:26:57 +0800 Subject: [PATCH] fix test Signed-off-by: drivebyer --- tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml b/tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml index 3607b6b80..bbdbf063b 100644 --- a/tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml +++ b/tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml @@ -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: