Skip to content

Commit 433874f

Browse files
authored
Merge pull request #1417 from aFlyBird0/feat-e2e-check-url
test(e2e): the accessibility of flask
2 parents d54b23d + b06bc6f commit 433874f

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/e2e-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ jobs:
9090
- name: test 2 - check if pod is ready
9191
run: while [[ $(kubectl get pods -l app=dtm-e2e-go -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "pod not ready yet..."; sleep 3; done
9292
timeout-minutes: 10
93+
- name: test 3 - check flask app can be reached
94+
run:
95+
# get cluster ip of the service created by the argocd
96+
clusterIP=$(kubectl get svc helloworld -n default -o jsonpath='{.spec.clusterIP}')
97+
# curl flask url and check if it returns "Hello, World!", if not, echo error and exit 1
98+
curl -s http://$clusterIP:8080 | grep "Hello, World!" || (echo "failed to access to flask app" && exit 1)
9399
- name: test 2 - clean
94100
run: ./dtm delete -f e2e-apps.yaml -y
95101
- name: test e2e success or not

docs/use-cases/gitops-python-flask/4-gitlab-dtm-apps.zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cd test/
5151
接着,在新创建的目录下,运行下面的命令:
5252

5353
```shell
54-
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
54+
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
5555
```
5656

5757
这个脚本会根据你的操作系统来下载对应的 `dtm` 二进制文件,保存到当前目录。然后,赋予其可执行权限。

docs/use-cases/gitops/2-gitops-tools.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cd test/
6161
Then, under the newly created directory, execute the following command:
6262

6363
```shell
64-
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
64+
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
6565
```
6666

6767
This script checks your system and downloads the corresponding `dtm` binary. Then the binary will be granted execution permission.

docs/use-cases/gitops/2-gitops-tools.zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cd test/
6161
接着,在新创建的目录下,运行下面的命令:
6262

6363
```shell
64-
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
64+
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
6565
```
6666

6767
这个脚本会根据你的操作系统来下载对应的 `dtm` 二进制文件。然后,赋予其可执行权限。

0 commit comments

Comments
 (0)