diff --git a/tests/e2e-chainsaw/v1beta2/setup/ha/chainsaw-test.yaml b/tests/e2e-chainsaw/v1beta2/setup/ha/chainsaw-test.yaml index e81d4c3da..4f0f2420a 100644 --- a/tests/e2e-chainsaw/v1beta2/setup/ha/chainsaw-test.yaml +++ b/tests/e2e-chainsaw/v1beta2/setup/ha/chainsaw-test.yaml @@ -18,16 +18,6 @@ spec: - apply: file: ../../../../data-assert/resources.yaml - - name: Put data - try: - - script: - timeout: 30s - content: > - kubectl exec --namespace ${NAMESPACE} --container data-assert data-assert -- - bash -c "cd /go/src/data-assert && go run main.go gen-redis-data --host redis-sentinel-sentinel.${NAMESPACE}.svc.cluster.local:26379 --mode sentinel" - check: - (contains($stdout, 'OK')): true - - name: Test Master IP consistency try: - sleep: @@ -43,6 +33,16 @@ spec: check: (contains($stdout, 'OK')): true + - name: Put data + try: + - script: + timeout: 30s + content: > + kubectl exec --namespace ${NAMESPACE} --container data-assert data-assert -- + bash -c "cd /go/src/data-assert && go run main.go gen-redis-data --host redis-sentinel-sentinel.${NAMESPACE}.svc.cluster.local:26379 --mode sentinel" + check: + (contains($stdout, 'OK')): true + # New created cluster, the first pod is master - name: Terminate the redis-replication-0 pod try: @@ -53,16 +53,6 @@ spec: - sleep: duration: 120s - - name: Assert data - try: - - script: - timeout: 30s - content: > - kubectl exec --namespace ${NAMESPACE} --container data-assert data-assert -- - bash -c "cd /go/src/data-assert && go run main.go chk-redis-data --host redis-sentinel-sentinel.${NAMESPACE}.svc.cluster.local:26379 --mode sentinel" - check: - (contains($stdout, 'OK')): true - - name: Test Master IP consistency try: - script: @@ -75,3 +65,13 @@ spec: if [ "$MASTER_IP_FROM_SENTINEL" = "$MASTER_IP_FROM_LABEL" ] && [ "$MASTER_IP_FROM_SENTINEL" = "$MASTER_IP_FROM_STATUS" ]; then echo "OK"; else echo "FAIL"; fi check: (contains($stdout, 'OK')): true + + - name: Assert data + try: + - script: + timeout: 30s + content: > + kubectl exec --namespace ${NAMESPACE} --container data-assert data-assert -- + bash -c "cd /go/src/data-assert && go run main.go chk-redis-data --host redis-sentinel-sentinel.${NAMESPACE}.svc.cluster.local:26379 --mode sentinel" + check: + (contains($stdout, 'OK')): true