Open RodrigoFerretti opened 2 years ago
The main goal is to have any bucket upload integrated with pubsub notification. I dont know if this feature doesnt exists yet in this emulator or if I`m doing it wrong
After running the local emulator with docker-compose:
version: "3" services: gcs: container_name: gcs image: oittaa/gcp-storage-emulator ports: - 9023:9023 environment: PORT: 9023
I then tried to run the following code whitout success:
import os import google.cloud.storage as gcs from google.cloud.storage.notification import BucketNotification os.environ["STORAGE_EMULATOR_HOST"] = 'http://localhost:9023' gcs_client: gcs.Client = gcs.Client() gcs_client.create_bucket('bucket_name') bucket: gcs.Bucket = gcs_client.get_bucket('bucket_name') notification: BucketNotification = bucket.notification('topic_name', 'project_id') notification.create(gcs_client)
It raises ConnectionError.
ConnectionError
('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')
Any help or ideas? Thanks!
It doesn't exist at the moment, but pull requests are welcome!
Description
The main goal is to have any bucket upload integrated with pubsub notification. I dont know if this feature doesnt exists yet in this emulator or if I`m doing it wrong
Example
After running the local emulator with docker-compose:
I then tried to run the following code whitout success:
It raises
ConnectionError
.Any help or ideas? Thanks!