Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: e2e test opt #746

Merged
merged 31 commits into from
Jan 26, 2024
Merged

feat: e2e test opt #746

merged 31 commits into from
Jan 26, 2024

Conversation

sjcsjc123
Copy link
Collaborator

@sjcsjc123 sjcsjc123 commented Dec 31, 2023

Ⅰ. Describe what this PR did

e2e测试优化,实现测试环境复用

Ⅱ. Does this pull request fix one issue?

fixes: #709

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d35d23e) 38.11% compared to head (09c47f1) 38.17%.
Report is 12 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #746      +/-   ##
==========================================
+ Coverage   38.11%   38.17%   +0.05%     
==========================================
  Files          61       61              
  Lines       10323    10342      +19     
==========================================
+ Hits         3935     3948      +13     
- Misses       6089     6096       +7     
+ Partials      299      298       -1     

see 4 files with indirect coverage changes

Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@sjcsjc123 sjcsjc123 marked this pull request as draft January 1, 2024 15:20
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
# Conflicts:
#	Makefile.core.mk
#	test/e2e/conformance/utils/suite/suite.go
#	test/e2e/e2e_test.go
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@sjcsjc123 sjcsjc123 marked this pull request as ready for review January 2, 2024 08:31
sjcsjc123 and others added 4 commits January 3, 2024 21:08
# Conflicts:
#	test/e2e/conformance/utils/suite/suite.go
#	test/e2e/e2e_test.go
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@johnlanni
Copy link
Collaborator

cc @2456868764

test/e2e/e2e_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
# Conflicts:
#	test/e2e/conformance/utils/suite/suite.go
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@sjcsjc123
Copy link
Collaborator Author

@2456868764 已取消移除cleanup参数,不过只能放在TestClean方法上,三个func不共享testing.T,会在prepare阶段就把base resource给清理了

Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@2456868764
Copy link
Collaborator

LGTM

@johnlanni
Copy link
Collaborator

https://github.com/alibaba/higress/tree/main/test

@sjcsjc123 请更新一下这篇README ,补充下在本地运行e2e test时复用环境的建议

Signed-off-by: sjcsjc123 <1401189096@qq.com>
@sjcsjc123
Copy link
Collaborator Author

https://github.com/alibaba/higress/tree/main/test

@sjcsjc123 请更新一下这篇README ,补充下在本地运行e2e test时复用环境的建议

已添加

@@ -27,4 +27,5 @@ var (
WasmPluginType = flag.String("wasmPluginType", "GO", "Define wasm plugin type, currently supports GO, CPP")
WasmPluginName = flag.String("wasmPluginName", "", "Define wasm plugin name")
IsEnvoyConfigTest = flag.Bool("isEnvoyConfigTest", false, "Determine if run envoy config conformance test")
TestArea = flag.String("test-area", "all", "Test area to run, like all to run setup/run/clean, setup to run setup only, run to run run only, clean to run clean only")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"run to run run only" 😄 that's confused.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更改解释

test/README.md Outdated
@@ -35,6 +35,13 @@ It can be divided into below steps:
2. Prepare resources and install them into cluster, like backend services/deployments.
3. Load conformance tests we choose to open in `e2e_test.go` / `higressTests Slice`, and run them one by one, fail if it is not expected.

> Note: You can use `TestArea` flag to control which area you want to run.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

简单说明要复用e2e环境的步骤是怎样即可,可以加一小节。
另外可以帮忙把这篇README搞一个中文版本吗 🙏

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已添加

Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
@sjcsjc123
Copy link
Collaborator Author

@2456868764 之前test-area为setup的时候存在cleanup为true在setup阶段就清除环境的问题。需要重新review。

Signed-off-by: sjcsjc123 <1401189096@qq.com>
Signed-off-by: sjcsjc123 <1401189096@qq.com>
Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@johnlanni johnlanni merged commit a624351 into alibaba:main Jan 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e 测试优化
4 participants