-
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
[bigtable] - Add an example of a cloud function with Bigtable #1742
Conversation
👋 Can you also add yourself as codeowner in the |
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'm -1 on mocking APIs unless absolutely necessary (mock tests may not detect client library surface changes), but other than that LGTM.
|
||
return { | ||
program: proxyquire('../', { | ||
'@google-cloud/bigtable': {Bigtable: BigtableMock}, |
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.
Is it worth testing this directly instead of using a mocked client library?
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 don't have a strong opinion about this, I'm just following what every other sample has done.
If you ask me, that's an antipattern. 🙂
We should use system tests wherever pragmatic; mocking should be reserved
for situations where system tests don't work well. (E.g. when they take 5+
minutes to run.)
|
I agree, system tests often give us a better indication if something breaks. That being said, considering that we have lots of samples in this repo that use |
Happy to help provide a review in the future on the tests |
Oh - one more thing that I almost forgot: these samples should live in (@grant and I previously decided that the top-level |
these will be in the functions doc and potentially the bigtable docs, just like the Spanner ones |
ping @ace-n does your objection still hold with @billyjacobson 's clarification? |
FYI: chatted with @labtopia offline, we are 👎on adding these to the (The "spanner tutorial" you mentioned likely should either be removed entirely [given that we have this page], or moved to the What we are in favor of is linking out from the |
No description provided.