Skip to content

chore(internal/snippets): refactor snippets_test.go to use sample values#1

Closed
julieqiu wants to merge 6 commits intoorganizeexfrom
pr2
Closed

chore(internal/snippets): refactor snippets_test.go to use sample values#1
julieqiu wants to merge 6 commits intoorganizeexfrom
pr2

Conversation

@julieqiu
Copy link
Copy Markdown
Owner

snippets_test.go is refactor to use values from internal/testing/sample, instead of its own hardcoded values.

julieqiu and others added 6 commits May 11, 2024 15:08
snippets_test.go is refactor to use values from internal/testing/sample,
instead of its own hardcoded values.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](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` | [![age](https://developer.mend.io/api/mc/badges/age/go/cloud.google.com%2fgo/v0.113.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/cloud.google.com%2fgo/v0.113.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/cloud.google.com%2fgo/v0.112.2/v0.113.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/cloud.google.com%2fgo/v0.112.2/v0.113.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `v0.177.0` -> `v0.180.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fapi/v0.180.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fapi/v0.180.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fapi/v0.177.0/v0.180.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fapi/v0.177.0/v0.180.0?slim=true)](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` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](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` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](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` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20240429193739-8cf5692501f6/v0.0.0-20240509183442-62759503f434?slim=true)](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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;9774](https://github.com/googleapis/google-cloud-go/issues/9774)) ([53ccb20](https://github.com/googleapis/google-cloud-go/commit/53ccb20d925ccb00f861958d9658b55738097dc6)), refs [#&#8203;9773](https://github.com/googleapis/google-cloud-go/issues/9773)

##### Documentation

-   **testing:** Switch deprecated WithInsecure to WithTransportCredentials ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 julieqiu closed this May 13, 2024
julieqiu pushed a commit that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants