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

test: add tests for autogen-snippets option #1055

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

busunkim96
Copy link
Contributor

Follow up to #1044

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2021
@busunkim96 busunkim96 marked this pull request as ready for review November 1, 2021 14:49
@busunkim96 busunkim96 requested a review from a team as a code owner November 1, 2021 14:49
Copy link
Contributor

@software-dov software-dov left a comment

Choose a reason for hiding this comment

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

LGTM, one minor test case I think should be added, but not worth blocking the review over.

# so always disable snippetgen in that case
# https://github.com/googleapis/gapic-generator-python/issues/1052
options = Options.build("old-naming")
assert not options.autogen_snippets
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, just for the sake of completeness, it would be good to have a test where both autogen-snippets=True and old-naming are set to make sure that the builder logic handles that correctly.

@busunkim96 busunkim96 added the automerge Merge the pull request once unit tests and other checks pass. label Nov 2, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit 185ecc7 into master Nov 2, 2021
@gcf-merge-on-green gcf-merge-on-green bot deleted the add-options-test branch November 2, 2021 20:16
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 2, 2021
busunkim96 added a commit that referenced this pull request Nov 8, 2021
vam-google pushed a commit that referenced this pull request Nov 8, 2021
* Revert "test: add tests for autogen-snippets option (#1055)"

This reverts commit 185ecc7.

* Revert "feat: generate code snippets by default (#1044)"

This reverts commit e46f443.
busunkim96 added a commit that referenced this pull request Feb 3, 2022
Enable snippetgen for the default (non-Ads) templates.

This reverts commit 8bdb709 (which was a revert of #1044 and #1055).

I've checked that the changes are OK (don't break generation for any APIs) by creating a [tag](https://github.com/googleapis/gapic-generator-python/commits/v0.62.0b1) and running the [presubmit](https://critique.corp.google.com/cl/424921742).
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.

2 participants