Rohit-BM18
9b68189d29
feat(cli): compute snapshot diff stats ( #4444 )
...
Added functionality to calculate aggregate statistics when
comparing what's changed between snapshots using kopia diff
Statistics collected during snapshot diff computation includes:
- files added/removed/modified
- dirs added/removed/modified
- files/dirs with metadata changes but same underlying content (OID)
Testing approach:
Added a test for verifying stats collected when comparing two directories with the same objectID but metadata changes across snapshots (dir mode, dir mod time, dir owner, etc), expectation is all the appropriate dir stats fields are updated.
Added another test for verifying stats collected when comparing two directories with similar file contents but the metadata for the files have changed between snapshots but content remains unchanged. Expectation is all the relevant file level stats fields are updated.
Existing tests have been updated due to stats now being printed in addition to previous output.
2025-03-07 12:41:14 +00:00
Julio López
948162dce5
refactor(general): minor miscellaneous cleanups ( #4074 )
...
Cleanups:
- use non-format variants of Log/Print with no additional args;
- fold in Fprintf call with no args into the following one;
- add missing arg placeholder in format strings;
- use require.Positive instead of Greater(..., 0);
- rename function to fillWithZeros to avoid collision with builtin clear;
- define type for context key to avoid collisions.
2024-08-25 22:10:46 -07:00
coderwander
f125f09ddc
chore: fix some typos in comments ( #3805 )
...
Signed-off-by: coderwander <770732124@qq.com >
2024-04-16 14:48:03 -07:00
Minyi Zou
a620349db8
test(general): add crash consistency test to validate repository consistency when kopia stops abruptly ( #3142 )
...
* test(general): add tests for crash consistency in robustness feature
* test(general): add GenerateRandomFiles function
* test(general): rename tests for crash consistency in robustness feature
* Update tests/recovery/blobmanipulator/blobmanipulator.go
Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com >
* Update tests/robustness/crash_consistency_test/crash_consistency_test.go
Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com >
* test(general): add tool for crash consistency job for automatic test
* test(general): fix mistakes followed by comments
* test(general): modify Makefile with new tests
* test(general): delete absolute path
* test(general): crash consistency job make target change
* test: test in server
* test: set as local dir
* test: print log
* test: update dst path
* test(general): refactor test cases and tools
* test(general): reduce unused code
* test(general): fix bug
* test: append logs for testing
* test: remove deleted blob code
* test: handle cannot open issue
* test: remove kopia password relevant code
* test: add numbers of test and set parallel in test case
* test: block goroutine
* test: add test files
* test: refactor test tools
* test: add filter
* test: refactor file structure
* test: remove unused test job and relocate the filehandler
* test: fix error
* test: fix followed by comments
* fix: fix go lint problems
* Update tests/recovery/recovery_test/recovery_test.go
Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com >
* fix: fix error followed by comments
* chore: don't change previous code
* chore: don't change previous code
* test: remove unused stdoutpipe
* no error print for kill -9 case
* Instead of writing your own comparison, you can use the directory comparator from the Kopia's internal diff module
* remove mu and err out
* remove error code
* Update tests/recovery/blobmanipulator/blobmanipulator.go
Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com >
* remove useless code
---------
Co-authored-by: Minyi Zou <minyi.zou@kasten.io >
Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com >
Co-authored-by: chaitalisg <chaitali@kasten.io >
2023-08-02 15:54:14 -07:00
chaitalisg
b61a7627e9
test(general): Add test for snapshot fix command ( #2018 )
...
* add robustness test for snapshot fix commands
* temporary change to see if plumbing works
* add robustness test for snapshot fix commands
* temporary change to see if plumbing works
* debug
* revert changes to robustness main_test
* Move recovery tests to a new package
* Revert unwanted changes
* Updated make target
* Temporary change for a pipeline run
* Resolve go package issues
* Remove local path used for debugging
* Debugging
* Debugging
* Add new orchestration script for recovery test
* Add comments
* Add comments
* Revert changes to robustness job script
* Remove unawanted files
* Change permissions for the orchestration script
* Fix typo
* Executable
* Update orchestration script
* Fix linter errors
* Fix linter errors
* Fix linter errors
* fix: linter grouping issue
* Fix linter errors
* Fix linter errors
* Update tests/recovery/blobmanipulator/blobmanipulator.go
Co-authored-by: Aaron Alpar <55999015+aaron-kasten@users.noreply.github.com >
* Implement feedback
* Implement feedback
* Fix linter errors
* Address feedback
* Add maintenance functions
* Added mechanism to interrupt kopia operation during the test run
* Fix linter errors
* Revert debugging changes
* Fix linter errors
* Fix linter errors
* Replace syscall
* Skip test when KOPIA_EXE is not set
* Remove debugging changes
* Add kopia command interruption to simulate corruption
* Check if command is running before killing
* Delete a snapshot before calling maintenance
* Remove nil check for the process
Co-authored-by: Shikhar Mall <small@kopia.io >
Co-authored-by: Aaron Alpar <55999015+aaron-kasten@users.noreply.github.com >
2022-08-09 09:44:18 -07:00