You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for opening the issue, and for the fix suggestion.
I actually identified several other interface issues with fget_object().
Usually I encourage users to submit a pull request. but this time I am fixing it myself because it is a small issue and I am experimenting with a branching and CI/CD pipline.
The method
MockMinioClient.fget_object
doesn't work as expected when thefile_path
argument has a nested folder structure and doesn't exists.pytest-minio-mock/pytest_minio_mock/plugin.py
Lines 818 to 864 in 157693d
Expected behavior:
fget_object
should create the parent directory offile_path
before attempting toget_object
.Also, this is the implementation from
minio-py
https://github.com/minio/minio-py/blob/fd3571aa9b9402f050192ad4c6c087d2806ca9eb/minio/api.py#L1116
My proposed solution:
Add this line before calling
self.get_object
:Let me know what do you think about this! Or is there any reason why
makedirs
is purposely not called?The text was updated successfully, but these errors were encountered: