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

Add tests in flytepropeller/pkg /controller/executors from 72.3% to 87.3% coverage #4276

Merged
merged 4 commits into from
Oct 30, 2023

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Oct 21, 2023

Tracking issue

Fixes #4209
#4273

Describe your changes

Add tests in flytepropeller/pkg /controller/executors to leverage coverage.

  • flytepropeller/pkg/controller/executors/execution_context_test.go
  • flytepropeller/pkg/controller/executors/kube_test.go
  • flytepropeller/pkg/controller/executors/node_lookup_test.go

Note to reviewers

In this pull request, I've introduced two new structs within flytepropeller/pkg/controller/executors/kube_test.go: FakeReader and FakeObject.
Since these structs are not yet implemented in Flytepropeller, I could not generate mock objects for testing purposes.
This is the reason behind the current implementation.

Update:
Due to this revert, I have to update my test code.

Check all the applicable boxes

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

Screenshots

Before
image
After
image

Signed-off-by: Future Outlier <eric901201@gmai.com>
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6b0d61) 59.53% compared to head (42ec719) 59.31%.
Report is 3 commits behind head on master.

❗ Current head 42ec719 differs from pull request most recent head f2edb21. Consider uploading reports for the commit f2edb21 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4276      +/-   ##
==========================================
- Coverage   59.53%   59.31%   -0.23%     
==========================================
  Files         632      544      -88     
  Lines       53527    38933   -14594     
==========================================
- Hits        31867    23092    -8775     
+ Misses      19145    13561    -5584     
+ Partials     2515     2280     -235     
Flag Coverage Δ
unittests ?

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

see 570 files with indirect coverage changes

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

Future Outlier added 2 commits October 22, 2023 12:46
Signed-off-by: Future Outlier <eric901201@gmai.com>
@Future-Outlier Future-Outlier changed the title Add tests in flytepropeller/pkg /controller/executors from 54.0% to 87.3% coverage Add tests in flytepropeller/pkg /controller/executors from 72.3% to 87.3% coverage Oct 22, 2023
@Future-Outlier
Copy link
Member Author

I will add more tests in this dir...

@pingsutw pingsutw merged commit ac4ec7d into flyteorg:master Oct 30, 2023
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Housekeeping] Improve Test Coverage
3 participants