nodejs-datastore icon indicating copy to clipboard operation
nodejs-datastore copied to clipboard

feat: Clients should support the universe domain option

Open danieljbruce opened this issue 10 months ago • 0 comments

Summary:

The user should be able to set the universe domain so that outgoing calls work with a different Google Cloud Universe. Right now, if the user specifies a universe domain then it will not get used and the request will just be sent to the default Datastore endpoint.

Analogous changes were made in https://github.com/googleapis/nodejs-bigtable/pull/1563.

Changes:

src/index.ts: If a custom domain isn't provided and a universe domain is provided then instead of using the default url the client will send requests to a url for the universe domain.

test/service-path.ts: Add tests for when user provides a universe domain or uses the universe domain environment variable.

test/gapic-mocks/get-initialized-datastore-client.ts: A change to the test infrastructure that allows us to create a more realistic initialized Datastore client with a custom set of Datastore options.

test/request.ts: The linter is now complaining about this file so a cast is needed.

danieljbruce avatar Jan 22 '25 18:01 danieljbruce