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

feat: add unit tests for manager handlers #3202

Merged
merged 3 commits into from Apr 22, 2024

Conversation

BruceAko
Copy link
Contributor

Description

Add unit tests for manager handlers.

Related Issue

fix #2705

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@BruceAko
Copy link
Contributor Author

@gaius-qi So far I've written unit tests for application.go, could you please review this part of the code so that I can make sure I'm writing the unit tests in the right way? Thank you very much :)

@gaius-qi
Copy link
Member

@gaius-qi So far I've written unit tests for application.go, could you please review this part of the code so that I can make sure I'm writing the unit tests in the right way? Thank you very much :)

@BruceAko I think it is good!

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.78%. Comparing base (11ff4d4) to head (ab8a0af).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3202      +/-   ##
==========================================
+ Coverage   52.06%   52.78%   +0.72%     
==========================================
  Files         173      192      +19     
  Lines       19382    20341     +959     
==========================================
+ Hits        10091    10738     +647     
- Misses       8585     8800     +215     
- Partials      706      803      +97     
Flag Coverage Δ
unittests 52.78% <ø> (+0.72%) ⬆️

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

see 22 files with indirect coverage changes

@gaius-qi
Copy link
Member

gaius-qi commented Apr 19, 2024

@BruceAko It is also draft. Have you finished PR?

@BruceAko BruceAko force-pushed the feature/unittest branch 2 times, most recently from f61bf7b to e263888 Compare April 19, 2024 12:40
@BruceAko BruceAko marked this pull request as ready for review April 19, 2024 12:45
@BruceAko BruceAko requested a review from a team as a code owner April 19, 2024 12:45
@BruceAko BruceAko force-pushed the feature/unittest branch 3 times, most recently from db8194f to 08f5acc Compare April 21, 2024 08:44
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
@BruceAko
Copy link
Contributor Author

@gaius-qi I have finished PR now. Please take a look.

manager/handlers/application_test.go Outdated Show resolved Hide resolved
manager/handlers/application_test.go Outdated Show resolved Hide resolved
@gaius-qi
Copy link
Member

@BruceAko Can you add unit tests for �handlers.go in next PR? Thx

Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
@BruceAko BruceAko requested a review from gaius-qi April 22, 2024 05:20
@BruceAko
Copy link
Contributor Author

BruceAko commented Apr 22, 2024

@BruceAko Can you add unit tests for �handlers.go in next PR? Thx

@gaius-qi Okay. And I fixed the above changes in two new commits, PTAL.

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 5a9c3a6 into dragonflyoss:main Apr 22, 2024
23 checks passed
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.

Add unit test for manager handlers
2 participants