Skip to content

Commit

Permalink
feat: Add e2e approvers and uncomment some testcase
Browse files Browse the repository at this point in the history
Signed-off-by: duanmengkk <[email protected]>
  • Loading branch information
duanmengkk committed Dec 7, 2023
1 parent 8847a72 commit c4c0414
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions hack/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approvers:
- wuyingjun-lucky
- duanmengkk
reviewers:
- wuyingjun-lucky
- duanmengkk
12 changes: 5 additions & 7 deletions hack/rune2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ util::wait_for_condition "mcs of member2 are ready" \

nginx_service_ip=$(kubectl -n kosmos-e2e get svc nginx-service -o=jsonpath='{.spec.clusterIP}')

# e2e test for access nginx service
#docker exec -it ${HOST_CLUSTER_NAME}-control-plane sh -c "curl -sSf -m 5 ${nginx_service_ip}:80" && echo "success" || { echo "fail"; exit 1; }
# e2e test for access nginx service, should wait for cluster-link-agent is worked firstly
sleep 100 && docker exec -it ${HOST_CLUSTER_NAME}-control-plane sh -c "curl -sSf -m 5 ${nginx_service_ip}:80" && echo "success" || { echo "fail"; exit 1; }

# e2e for mysql-operator
kubectl --context="kind-cluster-host" apply -f "${ROOT}"/../test/e2e/deploy/mysql-operator
util::wait_for_condition "mysql operator are ready" \
"kubectl --context=kind-${HOST_CLUSTER_NAME} get pods -n mysql-operator mysql-operator-0 | awk 'NR>1 {if (\$3 == \"Running\") exit 0; else exit 1; }'" \
300

#kubectl --context="kind-cluster-host" exec -it /bin/sh -c
kubectl --context="kind-${HOST_CLUSTER_NAME}" apply -f "${ROOT}"/../test/e2e/deploy/cr

#util::wait_for_condition "mysql cr are ready" \
# "[ \$(kubectl get pods -n kosmos-e2e --field-selector=status.phase=Running --no-headers | wc -l) -eq 2 ]" \
# 1200
util::wait_for_condition "mysql cr are ready" \
"[ \$(kubectl get pods -n kosmos-e2e --field-selector=status.phase=Running --no-headers | wc -l) -eq 2 ]" \
1200

echo "E2e test of mysql-operator success"

Expand Down
6 changes: 6 additions & 0 deletions test/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approvers:
- wuyingjun-lucky
- duanmengkk
reviewers:
- wuyingjun-lucky
- duanmengkk

0 comments on commit c4c0414

Please sign in to comment.