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

Improve resource manager test coverage #5973

Merged

Conversation

luckyarthur
Copy link
Contributor

@luckyarthur luckyarthur commented Nov 8, 2024

Why are the changes needed?

the resource manager test coverage is 64.04%, which is behind 80%, this PR improves the coverage

What changes were proposed in this pull request?

add more test case coverage to resource manager in this pull request

How was this patch tested?

tests were run after every commit

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.00%. Comparing base (691bde5) to head (a8b3441).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5973      +/-   ##
==========================================
+ Coverage   36.97%   37.00%   +0.03%     
==========================================
  Files        1318     1318              
  Lines      132516   132516              
==========================================
+ Hits        49000    49043      +43     
+ Misses      79258    79229      -29     
+ Partials     4258     4244      -14     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.23% <ø> (+0.17%) ⬆️
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 62.29% <ø> (ø)
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.85% <ø> (ø)
unittests-flytepropeller 42.59% <ø> (ø)
unittests-flytestdlib 55.18% <ø> (ø)

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.

Attributes: &admin.WorkflowAttributes{},
}
_, failError := manager.UpdateWorkflowAttributes(context.Background(), request)
assert.Error(t, failError)
Copy link
Member

Choose a reason for hiding this comment

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

Can we also make sure it returns the right error?

Copy link
Member

Choose a reason for hiding this comment

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

and other similar places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all new added error test cases have been error type and error message checked in the code

}

_, validationError := manager.GetWorkflowAttributes(context.Background(), request)
assert.Error(t, validationError)
Copy link
Member

Choose a reason for hiding this comment

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

same here

…d error message check for UpdateProjectDomainAttributes

Signed-off-by: Arthur <[email protected]>
…r DeleteProjectDomainAttributes

Signed-off-by: Arthur <[email protected]>
@luckyarthur luckyarthur force-pushed the improve-source-manager-test-coverage branch from 90220c0 to 0372f31 Compare November 12, 2024 10:25
@troychiu troychiu changed the title Improve source manager test coverage Improve resource manager test coverage Nov 19, 2024
Signed-off-by: Eduardo Apolinario <[email protected]>
@eapolinario eapolinario enabled auto-merge (squash) December 26, 2024 20:04
@eapolinario eapolinario merged commit 7aeaa26 into flyteorg:master Dec 26, 2024
52 checks passed
Copy link

welcome bot commented Dec 26, 2024

Congrats on merging your first pull request! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants