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 source manager test coverage #5973

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

luckyarthur
Copy link

@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 36.92%. Comparing base (9486172) to head (a0c98bf).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5973      +/-   ##
==========================================
+ Coverage   36.86%   36.92%   +0.06%     
==========================================
  Files        1310     1310              
  Lines      131246   131372     +126     
==========================================
+ Hits        48380    48511     +131     
+ Misses      78668    78659       -9     
- Partials     4198     4202       +4     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.20% <ø> (+0.14%) ⬆️
unittests-flytecopilot 22.23% <ø> (+10.50%) ⬆️
unittests-flytectl 62.39% <ø> (ø)
unittests-flyteidl 6.92% <ø> (ø)
unittests-flyteplugins 53.84% <ø> (ø)
unittests-flytepropeller 42.90% <ø> (ø)
unittests-flytestdlib 55.31% <ø> (-0.12%) ⬇️

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
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

Arthur added 11 commits November 12, 2024 11:07
…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
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.

2 participants