Skip to content

[YUNIKORN-2797] Increase handlers.go test coverage#970

Closed
ryankert01 wants to merge 8 commits intoapache:masterfrom
ryankert01:YUNIKORN-2797
Closed

[YUNIKORN-2797] Increase handlers.go test coverage#970
ryankert01 wants to merge 8 commits intoapache:masterfrom
ryankert01:YUNIKORN-2797

Conversation

@ryankert01
Copy link
Member

What is this PR for?

Increase test coverage and some refactor.

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

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

How should this be tested?

Screenshots (if appropriate)

Questions:

  • - The licenses files need update.
  • - There is breaking changes for older versions.
  • - It needs documentation.

@codecov
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.05%. Comparing base (89348e6) to head (9bddd39).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #970      +/-   ##
==========================================
+ Coverage   80.95%   81.05%   +0.10%     
==========================================
  Files          97       97              
  Lines       12525    12525              
==========================================
+ Hits        10139    10152      +13     
+ Misses       2116     2103      -13     
  Partials      270      270              

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

Copy link
Contributor

@manirajv06 manirajv06 left a comment

Choose a reason for hiding this comment

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

looks good. Will merge after successful run.

@ryankert01
Copy link
Member Author

ryankert01 commented Sep 18, 2024

I got it! We shouldn't assert statusOK in this function's test because the tested function will not set statusOK in the slope.

@manirajv06
Copy link
Contributor

I got it! We shouldn't assert statusOK in this function's test because the tested function will not set statusOK in the slope.

It should other way around, not equal to StatusInternalServerError. Anyways, not a problem.

@ryankert01 ryankert01 deleted the YUNIKORN-2797 branch October 13, 2024 12:35
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