-
Notifications
You must be signed in to change notification settings - Fork 57
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 diff mode tests #513
Comments
I thought about this. The issue is that you need an external tool (git) to be able to test it. It is still possible, of course. Also it would probably be pretty hard to do a full test anyway as there are a lot of components there, e.g. a |
Isn't it a property of most integration tests? If |
It seems like my recent refactoring broke the diff mode. :( I'm not used to do a lot of manual testing after CI is passing and when I do, it's usually the normal mode run + our bash script wrapper which not necessarily cover everything (it doesn't include full diff, for starters). If diff mode will not be replaced by the baseline mode, it would be very useful to have some tests for it. :) |
Code was assigning to a wrong field so git.Zero was not replaced by the "master" string. This led to a panic that is quite hard to reproduce outside of the real-world environment. To make this mistake less likely in future, I removed fields from the struct and store these values as local values as they're only needed inside that function scope. gitRef looks unused. It was unused before the refactoring as well. Maybe it was used before but we broke something a long time ago? This calls for another investigation. Refs #513 Signed-off-by: Iskander Sharipov <[email protected]>
Code was assigning to a wrong field so git.Zero was not replaced by the "master" string. This led to a panic that is quite hard to reproduce outside of the real-world environment. To make this mistake less likely in future, I removed fields from the struct and store these values as local values as they're only needed inside that function scope. gitRef looks unused. It was unused before the refactoring as well. Maybe it was used before but we broke something a long time ago? This calls for another investigation. Refs #513 Signed-off-by: Iskander Sharipov <[email protected]>
noverify is only tested in normal mode where it reports all issues that were found.
The diff (git) mode is what may be the most important feature for the real use-cases.
We need to add at least some tests to a diff mode to make sure it works correctly and does not break. This is especially important since git_main is scheduled for refactoring.
I had several bug reports where diff was computed in an unexpected way. It's hard to fix these issues without having a foundation for verification (manual testing is meh).
The text was updated successfully, but these errors were encountered: