Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
  • Loading branch information
drivebyer committed Jan 14, 2025
1 parent 1379181 commit c6fef9d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/e2e-chainsaw/v1beta2/setup/ha/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit c6fef9d

Please sign in to comment.