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

Added tests pkg/util/fedinformer #5366

Merged

Conversation

anujagrawal699
Copy link
Contributor

Description:
This PR adds 3 new test files for pkg/util/fedinformer and enhances its code coverage and reliability of a critical component of the project. These new additions have increased its test coverage significantly.

Additions:
3 new test files are implemented in this PR.

  1. pkg/util/fedinformer/handlers_test.go
  2. pkg/util/fedinformer/typedmanager/multi-cluster-manager_test.go
  3. pkg/util/fedinformer/typedmanager/single-cluster-manager_test.go

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

What this PR does / why we need it:
This PR improves the test coverage and reliability of the fedinformer package, which is critical for the functionality of the project. Enhanced testing ensures better stability and performance.

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

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 13, 2024
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2024

⚠️ 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 ✅

Project coverage is 30.26%. Comparing base (235ec91) to head (daf29c5).
Report is 163 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5366      +/-   ##
==========================================
+ Coverage   29.01%   30.26%   +1.24%     
==========================================
  Files         632      632              
  Lines       43862    43936      +74     
==========================================
+ Hits        12728    13297     +569     
+ Misses      30218    29676     -542     
- Partials      916      963      +47     
Flag Coverage Δ
unittests 30.26% <ø> (+1.24%) ⬆️

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

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

@XiShanYongYe-Chang
Copy link
Member

/assign

@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang PTAL

@XiShanYongYe-Chang
Copy link
Member

Hi @anujagrawal699 would you like to review the ut tests submitted by others? It's not mandatory, you can do it as you wish, and it's an important contribution to the community. Thank you very much!

@anujagrawal699
Copy link
Contributor Author

Hi @anujagrawal699 would you like to review the ut tests submitted by others? It's not mandatory, you can do it as you wish, and it's an important contribution to the community. Thank you very much!

Yeah, i would really love to review the UT tests. But how can i get started with it? I haven't done such things before.

@XiShanYongYe-Chang
Copy link
Member

Make a refer here: #5390 (comment)

I gave everyone the same advice. It wasn't stated in a public place, so I'll use the link instead.

@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang PTAL

@XiShanYongYe-Chang
Copy link
Member

Can you help squash the commits into one?

@anujagrawal699
Copy link
Contributor Author

Can you help squash the commits into one?

Can you guide me through it?

@XiShanYongYe-Chang
Copy link
Member

Can you guide me through it?

You can try with this: https://poe.com/s/3VOKcFAMUerETxS3aY0n

@anujagrawal699 anujagrawal699 force-pushed the addedTests-pkg/util/fedinformer branch from b2f37bc to 690581a Compare August 20, 2024 08:29
@anujagrawal699
Copy link
Contributor Author

Can you guide me through it?

You can try with this: https://poe.com/s/3VOKcFAMUerETxS3aY0n

@XiShanYongYe-Chang Thanks. Done!

@karmada-bot karmada-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 20, 2024
@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang Could you retest?

@XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang Could you retest?

Hi @anujagrawal699. you can squash the commits and push it again.

@anujagrawal699 anujagrawal699 force-pushed the addedTests-pkg/util/fedinformer branch from 8b837fc to 8f85504 Compare August 21, 2024 07:01
@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang Could you retest?

Hi @anujagrawal699. you can squash the commits and push it again.

@XiShanYongYe-Chang Done.

Signed-off-by: Anuj Agrawal <[email protected]>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <[email protected]>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <[email protected]>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <[email protected]>

Added tests for pkg/util/fedinformer

Signed-off-by: Anuj Agrawal <[email protected]>
@anujagrawal699 anujagrawal699 force-pushed the addedTests-pkg/util/fedinformer branch from 8f85504 to daf29c5 Compare August 22, 2024 10:18
@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang PTAL.

@anujagrawal699
Copy link
Contributor Author

@XiShanYongYe-Chang Can you please review?

@XiShanYongYe-Chang
Copy link
Member

Thanks a lot
/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2024
@karmada-bot
Copy link
Collaborator

[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 karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 26, 2024
@karmada-bot karmada-bot merged commit cc12739 into karmada-io:master Aug 26, 2024
12 checks passed
@RainbowMango RainbowMango added this to the v1.11 milestone Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants