-
Notifications
You must be signed in to change notification settings - Fork 46
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 to cover what is testable in SelfUpdate command #250
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
============================================
+ Coverage 84.77% 85.08% +0.31%
Complexity 720 720
============================================
Files 75 75
Lines 2226 2226
============================================
+ Hits 1887 1894 +7
+ Misses 339 332 -7 ☔ View full report in Codecov by Sentry. |
Thanks @kabalin, I'm going to keep this on hold until we have a couple of releases with the self-update command working. Only then we'll be able to add some integration (GHA) test to verify that it's working as expected. Ciao :-) |
a5e4f90
to
5ad82b0
Compare
a5fe2b4
to
1f256ab
Compare
Ok, now that we have > 2 releases supporting the I've added a second commit that just:
They seem to be passing... so I'm going to make this PR ready for review, it includes both the original unit tests and the new integration tests. Ciao :-) |
1f256ab
to
f78d7c9
Compare
Note that only helper methods can be tested for that command, not the execution of the update itself (it has to happen within a PHAR). And it doesn't make much sense to start mocking lots of stuff for that. Some integration tests @ CIS will be in charge of covering the real execution instead. Coming soon.
We just start with the 4.1.8 release that was the first supporting the selfupdate command. Then we upgrade to actual and then rollback to confirm that we are back to the original one. That should be enough to have it continuously covered.
f78d7c9
to
a79ed0a
Compare
I'm sef-merging this upstream now, just to have the Ciao .-) |
Note that only helper methods can be tested for that command, not the execution of the update itself (it has to happen within a PHAR). And it doesn't make much sense to start mocking lots of stuff for that.
Some integration tests @ CIS will be in charge of
covering the real execution instead. Coming soon.