karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Added tests for cmd/scheduler

Open anujagrawal699 opened this issue 1 year ago • 6 comments

Description: This PR introduces tests for cmd/scheduler/app/scheduler.go and cmd/scheduler/app/options/options.go .

What type of PR is this? /kind failing-test /kind feature

What this PR does / why we need it: This PR adds comprehensive tests for testing core functionality of cmd/scheduler .

Which issue(s) this PR fixes: Fixes a part of #5236

Special notes for your reviewer: The additions in this PR are similar to implemented in #5445 .

Does this PR introduce a user-facing change?:

NONE

anujagrawal699 avatar Aug 29 '24 12:08 anujagrawal699

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 31.72%. Comparing base (2efe03f) to head (b64a76c). Report is 36 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5459      +/-   ##
==========================================
+ Coverage   31.14%   31.72%   +0.58%     
==========================================
  Files         640      643       +3     
  Lines       44417    44432      +15     
==========================================
+ Hits        13832    14097     +265     
+ Misses      29583    29306     -277     
- Partials     1002     1029      +27     
Flag Coverage Δ
unittests 31.72% <ø> (+0.58%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 29 '24 12:08 codecov-commenter

@XiShanYongYe-Chang I implemented tests for options.go in this PR. If this is valid, then i could add something similar for cmd/descheduler/app/options/options.go. I'll squash the commits if it is valid or i'll drop it.

anujagrawal699 avatar Aug 29 '24 13:08 anujagrawal699

@XiShanYongYe-Chang I implemented tests for options.go in this PR. If this is valid, then i could add something similar for cmd/descheduler/app/options/options.go. I'll squash the commits if it is valid or i'll drop it.

@XiShanYongYe-Chang I didn't got what you meant by eyes emoji?

anujagrawal699 avatar Aug 30 '24 03:08 anujagrawal699

I didn't got what you meant by eyes emoji?

What I'm trying to say is that I'm reviewing. Maybe it's not enough, but there's a little bit less to choose from.

XiShanYongYe-Chang avatar Aug 30 '24 03:08 XiShanYongYe-Chang

I didn't got what you meant by eyes emoji?

What I'm trying to say is that I'm reviewing. Maybe it's not enough, but there's a little bit less to choose from.

Okay, i'll make the changes once you complete review.

anujagrawal699 avatar Aug 30 '24 03:08 anujagrawal699

@XiShanYongYe-Chang I created a similar test file for cmd/descheduler/app/options/options.go . Should i make a push it?

anujagrawal699 avatar Sep 02 '24 04:09 anujagrawal699

Let's wait until this pr is integrated.

XiShanYongYe-Chang avatar Sep 02 '24 06:09 XiShanYongYe-Chang

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XiShanYongYe-Chang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

karmada-bot avatar Sep 02 '24 06:09 karmada-bot