-
Notifications
You must be signed in to change notification settings - Fork 208
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
Unit test: User callback #1648
Comments
I think I (or someone else) could solve most of the testing requirements via an instrumented user-callback script that produces the required output (while checking if the call corresponds to current snapshot or mount state). A good basis for that is my "logging-only" user-callback script... |
Thanks for that script. I am working on it.... |
I never really used user-callback. So I played around. To me this is seems to be a valid and expected combination and order of user-callback "reasons" for a local snapshot profile. Do you agree? Is this the order of Reason I should test for?
|
Microsoft GitHub closed the accidentally closed the issue. Feel free to reopen if you think there should be more user callback related tests. |
This issue need to be solved before working on PR #1269 .
To my knowledge user-callback behavior is not covered by any of the current tests. Of course the code is executed in some tests (and covered in a technical way) but not tested.
IMHO the behavior to test would be if the callback reasons/steps are called on the right position on the timeline after/before some other specific steps of the taking a snapshot process.
Problem: My assumption is that this is nearly impossible in the current state of the productive code. The code is not isolated enough. And especially in testing user-callback behavior to many elements of code are involved. I see no way doing this with "unit tests" or "integration tests" in the near time.
Solution: A "dirty" approach could be to do a full snapshot run in an "system test" and then parsing the log output for the expected messages (or their patterns) and if they appear in the correct order. We still have tests doing full backups. They do use some helper code from
test/generic.py
.The text was updated successfully, but these errors were encountered: