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
Describe the bug
Using the Python API example works perfectly in a virtual environment.
Fails when run in a docker container with a time out. HTTPConnectionPool(host='172.17.0.1', port=63342): Max retries exceeded with url:
To Reproduce
importosimportpathlibasplimportshutilimportpytestfromgcp_storage_emulator.serverimportcreate_serverfromgoogle.auth.credentialsimportAnonymousCredentialsfromgoogle.cloudimportstorageimportupload@pytest.fixturedefmock_storage_client():
"""Google Cloud Storage emulator"""host="localhost"port=9023server=create_server(host, port, in_memory=True)
server.start()
os.environ["STORAGE_EMULATOR_HOST"] =f"http://{host}:{port}"yieldstorage.Client(credentials=AnonymousCredentials(), project="test-project")
server.stop()
delos.environ["STORAGE_EMULATOR_HOST"]
deftest_upload_folder(mock_storage_client):
"""Test uploading a folder to Google Cloud Storage"""bucket_name="test-upload-bucket"mock_storage_client.create_bucket(bucket_name)
Expected behavior
Bucket is created.
System (please complete the following information):
OS version: macos / linux
Python version: 3.9
gcp-storage-emulator version: latest
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
Using the Python API example works perfectly in a virtual environment.
Fails when run in a docker container with a time out.
HTTPConnectionPool(host='172.17.0.1', port=63342): Max retries exceeded with url:
To Reproduce
Expected behavior
Bucket is created.
System (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: