Skip to content

Commit

Permalink
feat(datastore): respect DATASTORE_EMULATOR_HOST setting (#9789)
Browse files Browse the repository at this point in the history
Co-authored-by: Baha Aiman <[email protected]>
  • Loading branch information
xmenxk and bhshkh committed Apr 18, 2024
1 parent a7c6e4d commit 7259373
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions datastore/datastore.go
Expand Up @@ -105,9 +105,7 @@ func NewClientWithDatabase(ctx context.Context, projectID, databaseID string, op
// If the emulator is available, dial it without passing any credentials.
if addr := os.Getenv("DATASTORE_EMULATOR_HOST"); addr != "" {
o = []option.ClientOption{
internaloption.WithDefaultEndpointTemplate(prodEndpointTemplate),
internaloption.WithDefaultUniverseDomain(prodUniverseDomain),
internaloption.WithDefaultMTLSEndpoint(prodMtlsAddr),
option.WithEndpoint(addr),
option.WithoutAuthentication(),
option.WithGRPCDialOption(grpc.WithInsecure()),
}
Expand Down

0 comments on commit 7259373

Please sign in to comment.