-
Notifications
You must be signed in to change notification settings - Fork 98
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: make e2e tests use terramate binary #145
Conversation
…ctor-tests-exec-binary
…ctor-tests-exec-binary
Codecov Report
@@ Coverage Diff @@
## main #145 +/- ##
===========================================
- Coverage 76.51% 55.34% -21.17%
===========================================
Files 29 29
Lines 3738 3796 +58
===========================================
- Hits 2860 2101 -759
- Misses 671 1548 +877
+ Partials 207 147 -60
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@katcipis look at the coverage stats =( The But not sure if supports passing args... very ugly and probably also will need a "coverage merge magic". |
Looks fine to me but it's also a bit beyond me.. |
It is not awesome but I'm OK with just letting it drop for now (the coverage), we already plan on extracting tests that are unrelated to cli stuff. Then for some cli dependent logic we could also extract it in a way that can be tested more isolated, leaving the e2e tests for very basic full integration (which still drops coverage maybe, but not as much). Or we can go with the hack, but it is so very hacky 😆 |
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 + some suggestions on how to improve the logging fatal calls, but can also be done on another PR.
chdir string | ||
} | ||
|
||
type runResult struct { |
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.
type runResult struct { | |
type execResult struct { |
Thinking if "exec" instead of "run" won't be more clear now. (run is not bad ...so just wondering).
Status int | ||
} | ||
|
||
type runExpected struct { |
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.
type runExpected struct { | |
type execExpected struct { |
Co-authored-by: Tiago Cesar Katcipis <tiagokatcipis@gmail.com>
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.
Thanks man 💯
In addition to the test refactor, the cli logging was changed to fatal in case of errors instead of returning it to main because this change makes it impossible to check using the sentinel errors and then there's no benefit for keeping the
Fatal()
in themain()
function, far away from when it happens. So now all thecli
package code can be moved to main package, but we can do this in a separate PR.