Skip to content

Commit

Permalink
[type:feat] support e2e contain in k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
moremind committed Sep 19, 2023
1 parent 2361fd9 commit 2fda37f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
if: steps.filter.outputs.changed == 'true'
run: |
bash ./shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/script/e2e-test-h2.sh
# bash ./shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/script/e2e-test-mysql.sh
bash ./shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/script/e2e-test-mysql.sh
- name: Cluster Test after Healthcheck
if: steps.filter.outputs.changed == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,58 +16,20 @@
# limitations under the License.
#

## init kubernetes for mysql
echo -e `nc -z -v -w30 shenyu-mysql 30306`

curPath=$(readlink -f "$(dirname "$0")")
PRGDIR=`dirname "$curPath"`
echo $PRGDIR
kubectl apply -f ${PRGDIR}/shenyu-mysql.yml
sleep 10s

kubectl get pod -o wide

sleep 60s

kubectl get pod -o wide

echo -e `nc -z -v -w30 shenyu-mysql 30306`

kubectl apply -f ${PRGDIR}/shenyu-deployment-mysql.yml
kubectl apply -f ${PRGDIR}/shenyu-app-service-mysql.yml

kubectl get pod -o wide

sleep 60s

kubectl run -it --rm --image=mysql:8.0 --restart=Never mysql-client -- mysql -h shenyu-mysql -uroot -pshenyue2e -e "show databases;"
kubectl get pod -o wide

chmod +x ${curPath}/healthcheck.sh
sh ${curPath}/healthcheck.sh mysql
#
#kubectl logs -l app=shenyu-admin-mysql
#
#sleep 10s
#
#kubectl -n kube-system get pods | grep Evicted |awk '{print$1}'|xargs kubectl -n kube-system delete pods
#kubectl get pod -o wide
#
## execute healthcheck.sh
#chmod +x ${curPath}/healthcheck.sh
#sh ${curPath}/healthcheck.sh mysql
#
### run e2e-test
#curl http://localhost:31196/actuator/shenyu/pluginData

### wait shenyu-admin and shenyu-bootstrap start

# get shenyu-admin pod name
#
#shenyu_admin_pod_name=`kubectl get pod -n kube-system | grep shenyu-admin | awk '{print $1}'`
#
## get shenyu-bootstrap pod name
#
#shenyu_bootstrap_pod_name=`kubectl get pod -n kube-system | grep shenyu-bootstrap | awk '{print $1}'`
#
## get shenyu-admin pod status
#
#shenyu_admin_pod_status=`kubectl get pod -n kube-system | grep shenyu-admin | awk '{print $3}'`
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
volumes:
- name: mysql-connector-volume
hostPath:
path: /tmp/shenyu-e2e/driver/mysql
path: /tmp/shenyu-e2e/mysql/driver
restartPolicy: Always

---
Expand Down

0 comments on commit 2fda37f

Please sign in to comment.