Skip to content
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

Merged
merged 15 commits into from
Nov 6, 2018

Conversation

djmailhot
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 5, 2018
Copy link
Contributor

@fhinkel fhinkel left a 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`;
Copy link
Contributor

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`));
Copy link
Contributor

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

@fhinkel
Copy link
Contributor

fhinkel commented Nov 6, 2018

Oops, linter failed. Want to have a look?

@fhinkel
Copy link
Contributor

fhinkel commented Nov 6, 2018

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?

@fhinkel fhinkel added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2018
@fhinkel fhinkel merged commit 9fd7701 into GoogleCloudPlatform:master Nov 6, 2018
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* 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>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 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).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* 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>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 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).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* 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>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 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).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
* 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>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 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).
renovate-bot pushed a commit to renovate-bot/nodejs-docs-samples that referenced this pull request Nov 17, 2022
…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>
ace-n pushed a commit that referenced this pull request Nov 17, 2022
🤖 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants