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
|
@TerryHowe We have changed the behavior of I also tracked to-do fixes in other places in #1446 |
TerryHowe
left a comment
There was a problem hiding this comment.
/lgtm
I cannot approve this, but looks good
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. |
qweeah
left a comment
There was a problem hiding this comment.
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 <terrylhowe@gmail.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
788d416 to
76e2615
Compare
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
76e2615 to
ecd9e7f
Compare
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
|
@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.