chore(internal/snippets): refactor snippets_test.go to use sample values#1
Closed
julieqiu wants to merge 6 commits intoorganizeexfrom
Closed
chore(internal/snippets): refactor snippets_test.go to use sample values#1julieqiu wants to merge 6 commits intoorganizeexfrom
julieqiu wants to merge 6 commits intoorganizeexfrom
Conversation
snippets_test.go is refactor to use values from internal/testing/sample, instead of its own hardcoded values.
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [cloud.google.com/go](https://github.com/googleapis/google-cloud-go) | `v0.112.2` -> `v0.113.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `v0.177.0` -> `v0.180.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [google.golang.org/genproto](https://github.com/googleapis/go-genproto) | `v0.0.0-20240429193739-8cf5692501f6` -> `v0.0.0-20240509183442-62759503f434` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [google.golang.org/genproto/googleapis/api](https://github.com/googleapis/go-genproto) | `v0.0.0-20240429193739-8cf5692501f6` -> `v0.0.0-20240509183442-62759503f434` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [google.golang.org/genproto/googleapis/rpc](https://github.com/googleapis/go-genproto) | `v0.0.0-20240429193739-8cf5692501f6` -> `v0.0.0-20240509183442-62759503f434` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/google-cloud-go (cloud.google.com/go)</summary> ### [`v0.113.0`](https://github.com/googleapis/google-cloud-go/releases/tag/v0.113.0) [Compare Source](https://github.com/googleapis/google-cloud-go/compare/v0.112.2...v0.113.0) ##### Features - **civil:** Add Compare method to Date, Time, and DateTime ([#​10010](https://github.com/googleapis/google-cloud-go/issues/10010)) ([34455c1](https://github.com/googleapis/google-cloud-go/commit/34455c15d62b089f3281ff4c663245e72b257f37)) ##### Bug Fixes - **all:** Bump x/net to v0.24.0 ([#​10000](https://github.com/googleapis/google-cloud-go/issues/10000)) ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4)) - **debugger:** Add internaloption.WithDefaultEndpointTemplate ([3b41408](https://github.com/googleapis/google-cloud-go/commit/3b414084450a5764a0248756e95e13383a645f90)) - **internal/aliasfix:** Handle import paths correctly ([#​10097](https://github.com/googleapis/google-cloud-go/issues/10097)) ([fafaf0d](https://github.com/googleapis/google-cloud-go/commit/fafaf0d0a293096559a4655ea61062cb896f1568)) - **rpcreplay:** Properly unmarshal dynamic message ([#​9774](https://github.com/googleapis/google-cloud-go/issues/9774)) ([53ccb20](https://github.com/googleapis/google-cloud-go/commit/53ccb20d925ccb00f861958d9658b55738097dc6)), refs [#​9773](https://github.com/googleapis/google-cloud-go/issues/9773) ##### Documentation - **testing:** Switch deprecated WithInsecure to WithTransportCredentials ([#​10091](https://github.com/googleapis/google-cloud-go/issues/10091)) ([2b576ab](https://github.com/googleapis/google-cloud-go/commit/2b576abd1c3bfca2f962de0e024524f72d3652c0)) </details> <details> <summary>googleapis/google-api-go-client (google.golang.org/api)</summary> ### [`v0.180.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.180.0) [Compare Source](https://github.com/googleapis/google-api-go-client/compare/v0.179.0...v0.180.0) ##### Features - **all:** Auto-regenerate discovery clients ([#​2578](https://github.com/googleapis/google-api-go-client/issues/2578)) ([6604a5d](https://github.com/googleapis/google-api-go-client/commit/6604a5dead0c0ffbd566d82728d8e40104b53950)) ### [`v0.179.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.179.0) [Compare Source](https://github.com/googleapis/google-api-go-client/compare/v0.178.0...v0.179.0) ##### Features - **all:** Auto-regenerate discovery clients ([#​2573](https://github.com/googleapis/google-api-go-client/issues/2573)) ([887c564](https://github.com/googleapis/google-api-go-client/commit/887c564239fdc5b2d1bbb156447281c644e81ee8)) - **all:** Auto-regenerate discovery clients ([#​2575](https://github.com/googleapis/google-api-go-client/issues/2575)) ([a784ae0](https://github.com/googleapis/google-api-go-client/commit/a784ae096a6d0d3b666907307cb61c88d461a9c6)) ##### Bug Fixes - Bump auth to v0.4.1 ([#​2577](https://github.com/googleapis/google-api-go-client/issues/2577)) ([090ff6c](https://github.com/googleapis/google-api-go-client/commit/090ff6c58926594a1fc58f4f3a7603c1ecfc3a21)) ### [`v0.178.0`](https://github.com/googleapis/google-api-go-client/releases/tag/v0.178.0) [Compare Source](https://github.com/googleapis/google-api-go-client/compare/v0.177.0...v0.178.0) ##### Features - **all:** Auto-regenerate discovery clients ([#​2561](https://github.com/googleapis/google-api-go-client/issues/2561)) ([2d22d11](https://github.com/googleapis/google-api-go-client/commit/2d22d11df9643a4fad0f9e952d7a92a419370122)) - **all:** Auto-regenerate discovery clients ([#​2564](https://github.com/googleapis/google-api-go-client/issues/2564)) ([b313e4b](https://github.com/googleapis/google-api-go-client/commit/b313e4bd70e601fd7a2a931f168fb1dece980e75)) - **all:** Auto-regenerate discovery clients ([#​2565](https://github.com/googleapis/google-api-go-client/issues/2565)) ([0843d21](https://github.com/googleapis/google-api-go-client/commit/0843d217048b2e713c0d273b95b33afb99926a8c)) - **all:** Auto-regenerate discovery clients ([#​2567](https://github.com/googleapis/google-api-go-client/issues/2567)) ([76b27f1](https://github.com/googleapis/google-api-go-client/commit/76b27f162032649ddb3cb3f06ed24c7333b3fa66)) - **all:** Auto-regenerate discovery clients ([#​2568](https://github.com/googleapis/google-api-go-client/issues/2568)) ([d922e3b](https://github.com/googleapis/google-api-go-client/commit/d922e3b559ce5832941390b4f9bf91210e3f6579)) - **all:** Auto-regenerate discovery clients ([#​2570](https://github.com/googleapis/google-api-go-client/issues/2570)) ([f2da582](https://github.com/googleapis/google-api-go-client/commit/f2da582c9f6aab240d44c8ebd2dcc43f5096f896)) - **all:** Auto-regenerate discovery clients ([#​2571](https://github.com/googleapis/google-api-go-client/issues/2571)) ([0c976dc](https://github.com/googleapis/google-api-go-client/commit/0c976dcc8d1d653f2284ce273493e6714a6d4b2a)) - **gen:** Add internaloption.EnableNewAuthLibrary ([#​2519](https://github.com/googleapis/google-api-go-client/issues/2519)) ([8c74bb8](https://github.com/googleapis/google-api-go-client/commit/8c74bb83e2bc27188154c506e63a3e0f3a042f55)) - **google-api-go-client:** Add x-goog-api-version header ([#​2563](https://github.com/googleapis/google-api-go-client/issues/2563)) ([fe54ffd](https://github.com/googleapis/google-api-go-client/commit/fe54ffd92359506fca1ffd70dc647db0ab9a903c)) ##### Documentation - Update commit style in CONTRIBUTING ([#​2566](https://github.com/googleapis/google-api-go-client/issues/2566)) ([5e44215](https://github.com/googleapis/google-api-go-client/commit/5e44215df618fcafd5f6c1bbe259062cddd32f1a)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/gapic-generator-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
Updated Go dependencies for Bazel repositories.
Package sample is added, which provides sample values for use in tests. The intent is to make it easier to reason about the various test cases, by using one example and explaining where various values are defined, using bigquery as an example. As a starting point, TestGenSnippetFile has been refactor to use the constants in internal/testing/sample, instead of hardcoding values in the tests. Other tests will be refactored in follow up PRs.
julieqiu
pushed a commit
that referenced
this pull request
Nov 24, 2025
….com (#1…" (googleapis#1667) This reverts commit 1e451fa.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
snippets_test.go is refactor to use values from internal/testing/sample, instead of its own hardcoded values.