OCA / storage

GNU Affero General Public License v3.0
66 stars 148 forks source link

[16.0][IMP] fs_storage: compute options protocol + refactor test class for re-use #314

Closed len-foss closed 6 months ago

len-foss commented 6 months ago

Before the change, reading the options protocol might not be in sync with the record protocol. This is particularly the case if the record is save in the middle of editing as the value resets, which can be quite confusing.

len-foss commented 6 months ago

@lmignon really tiny change but it makes things a bit easier, as while setting options the user might get confused between host/url/endpoint that mean the same thing but have a different key depending on the protocol.

len-foss commented 6 months ago

I've also added a split of the test class to be able to reuse it in other modules (in particular to work on dms_storage).

len-foss commented 6 months ago

So I've pushed another commit to help test other module that might depend on fs_storage. While working on https://github.com/OCA/dms/pull/275, as soon as there are more than one test that are run, the file would be created on a tmp_dir_1 and then the very next following file read would be on tmp_dir_2. It can be really maddening, so I think having a test class that resist these pain points can be really helpful.

lmignon commented 6 months ago

/ocabot merge patch

OCA-git-bot commented 6 months ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-314-by-lmignon-bump-patch, awaiting test results.

OCA-git-bot commented 6 months ago

Congratulations, your PR was merged at b9838eb265c96a9f4461e75d223c90c2a70e9cf4. Thanks a lot for contributing to OCA. ❤️