Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alkatrivedi
Copy link
Contributor

@alkatrivedi alkatrivedi commented Feb 13, 2024

This PR introduces emulator support for the API samples, which are using admin client autogenerated methods.

Sample usage

For Instance samples:

const {Spanner} = require('@google-cloud/spanner');
const spanner = new Spanner({
    projectId: projectId,
  });
 const instanceAdminClient = spanner.get_instance_admin_client();

For Database samples:

const {Spanner} = require('@google-cloud/spanner');
const spanner = new Spanner({
    projectId: projectID,
  });
const databaseAdminClient = spanner.get_database_admin_client();

@alkatrivedi alkatrivedi requested review from a team as code owners February 13, 2024 08:15
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/nodejs-spanner API. samples Issues that are directly related to samples. labels Feb 13, 2024
@alkatrivedi alkatrivedi changed the title feat(spanner): add emulator support for the apis samples using admin client autogenerated methods feat(spanner): add emulator support for the admin client autogenerated API samples Feb 13, 2024
@product-auto-label product-auto-label bot removed the size: s Pull request size is small. label Feb 23, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Feb 27, 2024

it('should list the instances', async () => {
assert(projectId);
const [operation] = await instanceAdminClient.listInstances({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
const [operation] = await instanceAdminClient.listInstances({
const [instances] = await instanceAdminClient.listInstances({

@surbhigarg92 surbhigarg92 added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Feb 27, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 27, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 27, 2024
@surbhigarg92 surbhigarg92 added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 28, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 28, 2024
@surbhigarg92 surbhigarg92 added the automerge Merge the pull request once unit tests and other checks pass. label Feb 28, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit e2fe5b7 into googleapis:main Feb 28, 2024
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 28, 2024
@alkatrivedi alkatrivedi deleted the admin-emulator-support branch March 5, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/nodejs-spanner API. samples Issues that are directly related to samples. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants