Skip to content

Commit

Permalink
uncomment the e2e test shell
Browse files Browse the repository at this point in the history
Signed-off-by: duanmengkk <[email protected]>
  • Loading branch information
duanmengkk committed Jan 10, 2024
1 parent 5d73e7b commit 1153de8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions hack/rune2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ util::wait_for_condition "mcs of member3 are ready" \
"[ \$(kubectl --context=kind-${MEMBER3_CLUSTER_NAME} -n ${E2E_NAMESPACE} get endpointslices.discovery.k8s.io --no-headers -l kubernetes.io\/service-name=nginx-service | wc -l) -eq 1 ] " \
120

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

# e2e test for access nginx service
sleep 100 && docker exec -i ${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-${HOST_CLUSTER_NAME}" apply -f "${ROOT}"/../test/e2e/deploy/cr
# 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-${HOST_CLUSTER_NAME}" apply -f "${ROOT}"/../test/e2e/deploy/cr

#util::wait_for_condition "mysql cr are ready" \
# "[ \$(kubectl --context="kind-${HOST_CLUSTER_NAME}" get pods -n kosmos-e2e --field-selector=status.phase=Running -l app.kubernetes.io/name=mysql --no-headers | wc -l) -eq 2 ]" \
# 1200
util::wait_for_condition "mysql cr are ready" \
"[ \$(kubectl --context="kind-${HOST_CLUSTER_NAME}" get pods -n kosmos-e2e --field-selector=status.phase=Running -l app.kubernetes.io/name=mysql --no-headers | wc -l) -eq 2 ]" \
1200

#echo "E2e test of mysql-operator success"
echo "E2e test of mysql-operator success"

# Install ginkgo
GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo
Expand Down

0 comments on commit 1153de8

Please sign in to comment.