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

[YUNIKORN-2762] Improve util funtion's test coverage #879

Closed
wants to merge 3 commits into from

Conversation

SP12893678
Copy link
Contributor

What is this PR for?

Improve the following function unit test in util.go

  •  IsPluginMode
  • Convert2ConfigMap
  • IsPodRunning
  • GetNamespaceQuotaFromAnnotation (JSON Unmarshal error case)
  • WaitForCondition
  • GetCoreSchedulerConfigFromConfigMap (NotMapping file case)

What type of PR is it?

  • - Test

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2762

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@SP12893678 thanks for this nice test

pkg/common/utils/utils.go Show resolved Hide resolved
Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

A few comments.

pkg/common/utils/utils_test.go Show resolved Hide resolved
pkg/common/utils/utils_test.go Outdated Show resolved Hide resolved
pkg/common/utils/utils_test.go Show resolved Hide resolved
Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

+1 LGTM

Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

@SP12893678 Could you please fix the lint issue in CI.

@SP12893678
Copy link
Contributor Author

SP12893678 commented Jul 21, 2024

@SP12893678 Could you please fix the lint issue in CI.

Sure. I have fixed lint problem currently.

Copy link

codecov bot commented Jul 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.60%. Comparing base (f281908) to head (f47a831).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #879      +/-   ##
==========================================
+ Coverage   67.30%   67.60%   +0.30%     
==========================================
  Files          70       70              
  Lines        7625     7625              
==========================================
+ Hits         5132     5155      +23     
+ Misses       2274     2252      -22     
+ Partials      219      218       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@chenyulin0719 chenyulin0719 left a comment

Choose a reason for hiding this comment

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

+1 LGTM

@SP12893678 SP12893678 deleted the YUNIKORN-2762 branch July 29, 2024 12:33
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.

3 participants