-
Notifications
You must be signed in to change notification settings - Fork 171
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
refactor: Successor getting with separation of concerns #1443
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1443 +/- ##
==========================================
+ Coverage 83.29% 83.43% +0.13%
==========================================
Files 110 112 +2
Lines 3892 3936 +44
==========================================
+ Hits 3242 3284 +42
- Misses 426 428 +2
Partials 224 224 ☔ View full report in Codecov by Sentry. |
46084e7
to
5cf03b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@TerryHowe We have changed the behavior of I also tracked to-do fixes in other places in #1446 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I cannot approve this, but looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with suggestion. This PR also requires improved code testing. I'd suggest adding some unit tests.
be31fa7
to
06ba573
Compare
I was kind of hoping to do this as a follow up, but to increase test coverage, I moved |
06ba573
to
d560884
Compare
There is a bit of a chicken/egg situation here. The whole reason I went down this path of refactoring successors was to create a tty handler and once the tty handler was created, the code would be way more testable. I need to think about this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, missing lines in tty.go
and text.go
can be covered by unit tests though.
4c50b9c
to
5d5d6ee
Compare
54f841f
to
12c4d07
Compare
@TerryHowe Can you help add unit test to cover missing lines in cmd/oras/internal/display/status/text.go? Thanks |
8e97c6b
to
270ad71
Compare
Signed-off-by: Terry Howe <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
788d416
to
76e2615
Compare
Signed-off-by: Terry Howe <[email protected]>
76e2615
to
ecd9e7f
Compare
Signed-off-by: Billy Zha <[email protected]>
@TerryHowe You have chosen the hard way but you have done it good! Thanks for the contribution. Added several test to cover more lines. PTAL. |
Thanks for working with me on this and all the others! LGTM |
What this PR does / why we need it:
The PrintSuccessorStatus method was complicated with the function passed in and it didn't show the best separation of concerns. The print module ideally wouldn't know about a fetcher for example.