-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
regression with using fake local GCS server #1680
Comments
Hi @vikstrous , thanks for the report. Can you show me how you are setting the endpoint when you have this issue? I took a look at your repo but it wasn't immediately obvious to me. Thanks! |
Ah, actually, it looks like we had to do some hacks to set the endpoint. Our code looks something like this: addr := "127.0.0.1:4443"
opt := option.WithHTTPClient(&http.Client{
Transport: &http.Transport{
DialTLS: func(string, string) (net.Conn, error) {
return tls.Dial("tcp", addr, &tlsConfig)
},
},
})
client, err := storage.NewClient(ctx, opt)
if err != nil {
panic(err)
} |
Ah, that can be easily fixed on your end then. Just pass the following option into NewClient as well:
Let me know if that doesn't work on your end. |
WithEndpoint was the right hint, but I actually had to use |
Got it, thanks for following up! |
Client
Storage
Describe Your Environment
Local docker container running https://github.com/fsouza/fake-gcs-server, tests trying to connect to it with the GCS client in this repo.
Expected Behavior
Connects to the local server
Actual Behavior
Connects to https://storage.googleapis.com/storage/v1/ unconditionally and returns a 404 error
The regression was introduced by fc09f3a in https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.3.0 (version 1.3.0)
The text was updated successfully, but these errors were encountered: