-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update functions/scheduleinstance code sample with PubSub functions & unit tests #820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
test(`startInstanceHttp: should fail with empty request body`, async (t) => { | ||
const mocks = getMocks(); | ||
const sample = getSample(); | ||
mocks.req.method = `POST`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why backticks instead of single quotes?
mocks.event.data.data = Buffer.from(JSON.stringify(pubsubData)).toString('base64'); | ||
sample.program.stopInstancePubSub(mocks.event, mocks.callback); | ||
|
||
t.deepEqual(mocks.callback.firstCall.args[0], new Error(`Attribute 'zone' missing from payload`)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're using deepStrictEqual when possible
Oops, linter failed. Want to have a look? |
Weird, it failed on a test that you didn't touch - and when that was merged an hour ago the linter passes. @ace-n, can you have a look? |
* chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: fix translation Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
🤖 I have created a release *beep* *boop* --- ## [7.0.3](googleapis/nodejs-translate@v7.0.2...v7.0.3) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#814](googleapis/nodejs-translate#814)) ([ddc93f9](googleapis/nodejs-translate@ddc93f9)) * **deps:** Update dependency @google-cloud/vision to v3 ([#816](googleapis/nodejs-translate#816)) ([331c65b](googleapis/nodejs-translate@331c65b)) * Preserve default values in x-goog-request-params header ([#820](googleapis/nodejs-translate#820)) ([913ac11](googleapis/nodejs-translate@913ac11)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: fix translation Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
🤖 I have created a release *beep* *boop* --- ## [7.0.3](googleapis/nodejs-translate@v7.0.2...v7.0.3) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#814](googleapis/nodejs-translate#814)) ([ddc93f9](googleapis/nodejs-translate@ddc93f9)) * **deps:** Update dependency @google-cloud/vision to v3 ([#816](googleapis/nodejs-translate#816)) ([331c65b](googleapis/nodejs-translate@331c65b)) * Preserve default values in x-goog-request-params header ([#820](googleapis/nodejs-translate#820)) ([913ac11](googleapis/nodejs-translate@913ac11)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: fix translation Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
🤖 I have created a release *beep* *boop* --- ## [7.0.3](googleapis/nodejs-translate@v7.0.2...v7.0.3) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#814](googleapis/nodejs-translate#814)) ([ddc93f9](googleapis/nodejs-translate@ddc93f9)) * **deps:** Update dependency @google-cloud/vision to v3 ([#816](googleapis/nodejs-translate#816)) ([331c65b](googleapis/nodejs-translate@331c65b)) * Preserve default values in x-goog-request-params header ([#820](googleapis/nodejs-translate#820)) ([913ac11](googleapis/nodejs-translate@913ac11)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: fix translation Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
🤖 I have created a release *beep* *boop* --- ## [7.0.3](googleapis/nodejs-translate@v7.0.2...v7.0.3) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#814](googleapis/nodejs-translate#814)) ([ddc93f9](googleapis/nodejs-translate@ddc93f9)) * **deps:** Update dependency @google-cloud/vision to v3 ([#816](googleapis/nodejs-translate#816)) ([331c65b](googleapis/nodejs-translate@331c65b)) * Preserve default values in x-goog-request-params header ([#820](googleapis/nodejs-translate#820)) ([913ac11](googleapis/nodejs-translate@913ac11)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…loudPlatform#820) * chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: fix translation Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
🤖 I have created a release *beep* *boop* --- ## [7.0.3](googleapis/nodejs-translate@v7.0.2...v7.0.3) (2022-09-22) ### Bug Fixes * Allow passing gax instance to client constructor ([#814](googleapis/nodejs-translate#814)) ([ddc93f9](googleapis/nodejs-translate@ddc93f9)) * **deps:** Update dependency @google-cloud/vision to v3 ([#816](googleapis/nodejs-translate#816)) ([331c65b](googleapis/nodejs-translate@331c65b)) * Preserve default values in x-goog-request-params header ([#820](googleapis/nodejs-translate#820)) ([913ac11](googleapis/nodejs-translate@913ac11)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.