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

Fix UT not be properly executed during CI phase #911

Merged
merged 69 commits into from
Mar 4, 2025

Conversation

archlitchi
Copy link
Collaborator

@archlitchi archlitchi commented Mar 4, 2025

/kind bug

  1. we found that unit tests are not properly executed, because we don't add 'test' to phony object in Makefile. This PR fix that issue along with several ut failure.
  2. we update hami-core to latest version to support driver 570+cuda 12.8

archlitchi and others added 30 commits November 15, 2024 13:18
Signed-off-by: limengxuan <[email protected]>
Signed-off-by: limengxuan <[email protected]>
Signed-off-by: limengxuan <[email protected]>
Signed-off-by: limengxuan <[email protected]>
Signed-off-by: limengxuan <[email protected]>
Signed-off-by: limengxuan <[email protected]>
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/util/client/client.go 57.14% 2 Missing and 1 partial ⚠️
pkg/device/cambricon/device.go 80.00% 1 Missing ⚠️
Flag Coverage Δ
unittests 64.52% <66.66%> (+17.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/device/cambricon/device.go 79.71% <80.00%> (-8.92%) ⬇️
pkg/util/client/client.go 46.42% <57.14%> (-7.74%) ⬇️

... and 9 files with indirect coverage changes

@archlitchi
Copy link
Collaborator Author

/lgtm

@archlitchi archlitchi merged commit 8ec9730 into Project-HAMi:master Mar 4, 2025
12 of 13 checks passed
yangshiqi pushed a commit to yangshiqi/HAMi that referenced this pull request Mar 5, 2025
* fix make test not working properly

Signed-off-by: limengxuan <[email protected]>
yangshiqi added a commit to yangshiqi/HAMi that referenced this pull request Mar 6, 2025
factory.go: 将client的实例管理逻辑统一,方便调用和切换fake。兼容当前 KubeClient 全局变量的使用。
k8s_client.go: 统一实现 k8s 真实调用行为, 记录调用日志,去掉全局变量。

2.修改 util 和 util_test 中的相关调用, 统一 util_test 中测试用例的命名风格。
本次修改仅关注于 real 和 mock 分离,后续将完善更多 ut 测试,逐步替换当前 client 中的直接调用方式。

3.Fix UT not be properly executed during CI phase (Project-HAMi#911)

4.兼容当前新老调用 KubeClient 的用法,特别是 fake 替换时

Signed-off-by: yangshiqi <[email protected]>
yangshiqi added a commit to yangshiqi/HAMi that referenced this pull request Mar 6, 2025
factory.go: 将client的实例管理逻辑统一,方便调用和切换fake。兼容当前 KubeClient 全局变量的使用。
k8s_client.go: 统一实现 k8s 真实调用行为, 记录调用日志,去掉全局变量。

2.修改 util 和 util_test 中的相关调用, 统一 util_test 中测试用例的命名风格。
本次修改仅关注于 real 和 mock 分离,后续将完善更多 ut 测试,逐步替换当前 client 中的直接调用方式。

3.Fix UT not be properly executed during CI phase (Project-HAMi#911)

4.兼容当前新老调用 KubeClient 的用法,特别是 fake 替换时

Signed-off-by: yangshiqi <[email protected]>
yangshiqi pushed a commit to yangshiqi/HAMi that referenced this pull request Mar 6, 2025
* fix make test not working properly

Signed-off-by: limengxuan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant