-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat(gcsfs/core): support storage_emulator_host for http requests #424
feat(gcsfs/core): support storage_emulator_host for http requests #424
Conversation
Can this be used to replace all of the vcrpy test code and recordings? Happy to use whichever emulator makes that possible. |
I'm not sure.. I don't have any experience with vcrpy. For my use case, I typically use a docker-compose stack to spin up those emulators. I have only used fake-gcs-emulator. Here's an example command for that:
The reason for the change is because I'm leveraging this project in pyarrow and having the option lets me validate things locally. Really awesome project you guys have here! Feel free to add commits or point me in the direction to update vcrpy tests.. I'd have to find some free time to look at migrating away from it to a emulation approach |
It would be super simple! Simply remove everything to do with vcrpy, and do exactly as you say, spin up a docker container as a pytest global fixture, and set the env variable to point at it. I can have a go at this myself next week, if you don't fancy it. |
I'll take a peek this weekend if I find a window of time. Otherwise I'll check-in next week. I'm good either way. At work I context switch a lot between Python, Go, Elixir so I don't feel the level of confidence I typically feel as prior to this job it was Typescript/JS. 😭 so many languages.. |
I have started to move the tests to the emulator as opposed to vcrpy! |
Add support for specifying GCS emulator for this library.
I assume generating signed urls will not work, but for all other requests it should work fine.
While GCP does not release an official gcs emulator, there are a few community-driven projects:
The official python library does have support for
STORAGE_EMULATOR_HOST
Fixes #424