diff --git a/docs/development/test.md b/docs/development/test.md index 8ed3506bf..aaff6ebab 100644 --- a/docs/development/test.md +++ b/docs/development/test.md @@ -1,6 +1,6 @@ # Test -### Unit Test +## Unit Test Run all unit tests: @@ -8,13 +8,13 @@ Run all unit tests: go test ./... ``` -### End-to-end Tests +## End-to-end Tests -#### 1. e2e Test with Github Action +### 1 e2e Test with GitHub Action GitHub Actions will run e2e test automatically. -#### 2. e2e Test Locally +### 2 e2e Test Locally ```shell bash hack/e2e/e2e-run.sh diff --git a/docs/development/test.zh.md b/docs/development/test.zh.md index de9284cad..a33d3fbea 100644 --- a/docs/development/test.zh.md +++ b/docs/development/test.zh.md @@ -1,3 +1,28 @@ # 测试 -todo +## 单元测试 + +运行所有的单元测试: + +```shell +go test ./... +``` + +## 端到端测试 + +### 1 使用 GitHub Action 运行端到端测试 + +GitHub Actions 会在代码提交时自动运行端到端测试。 + +### 2 在本地运行端到端测试 + +```shell +bash hack/e2e/e2e-run.sh +``` + +请在测试前设置以下环境变量: + +- GITHUB_USER +- GITHUB_TOKEN +- DOCKERHUB_USERNAME +- DOCKERHUB_TOKEN