Skip to content

Commit

Permalink
Merge pull request #1417 from aFlyBird0/feat-e2e-check-url
Browse files Browse the repository at this point in the history
test(e2e): the accessibility of flask
  • Loading branch information
daniel-hutao authored Jan 6, 2023
2 parents d54b23d + b06bc6f commit 433874f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ jobs:
- name: test 2 - check if pod is ready
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
timeout-minutes: 10
- name: test 3 - check flask app can be reached
run:
# get cluster ip of the service created by the argocd
clusterIP=$(kubectl get svc helloworld -n default -o jsonpath='{.spec.clusterIP}')
# curl flask url and check if it returns "Hello, World!", if not, echo error and exit 1
curl -s http://$clusterIP:8080 | grep "Hello, World!" || (echo "failed to access to flask app" && exit 1)
- name: test 2 - clean
run: ./dtm delete -f e2e-apps.yaml -y
- name: test e2e success or not
Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases/gitops-python-flask/4-gitlab-dtm-apps.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cd test/
接着,在新创建的目录下,运行下面的命令:

```shell
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
```

这个脚本会根据你的操作系统来下载对应的 `dtm` 二进制文件,保存到当前目录。然后,赋予其可执行权限。
Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases/gitops/2-gitops-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cd test/
Then, under the newly created directory, execute the following command:

```shell
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
```

This script checks your system and downloads the corresponding `dtm` binary. Then the binary will be granted execution permission.
Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases/gitops/2-gitops-tools.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cd test/
接着,在新创建的目录下,运行下面的命令:

```shell
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
```

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

0 comments on commit 433874f

Please sign in to comment.