opendal
opendal copied to clipboard
new feature: improve the test cleanup to remove all test files after running tests
Feature Description
delete all test files permanently after running tests
Problem and Solution
Current behaviors
- some test files are generated by
TEST_FIXTURE, they gets deleted automatically after running the tests. such as: https://github.com/apache/opendal/blob/d479ac39efa9a88e10448ad81e47292b3b4ed688/core/tests/behavior/async_write.rs#L71 - some test files are generated during test cases and are manually removed before the test cases finish. such as: https://github.com/apache/opendal/blob/d479ac39efa9a88e10448ad81e47292b3b4ed688/core/tests/behavior/async_write.rs#L143
Problems
There are some cases where the test files might not be permanently deleted, which could lead to increased storage usage in backend services.
- In the first scenario, when
versioningis enabled, even if we delete the test files after running the tests, they still remain due toversioning. To remove them permanently, we must use a delete operation that specifies the version. - In the second scenario, if the test cases fail, the cleanup process will not be executed, leaving the test files behind.
Additional Context
No response
Are you willing to contribute to the development of this feature?
- [ ] Yes, I am willing to contribute to the development of this feature.