-
Notifications
You must be signed in to change notification settings - Fork 68
[ggj][gapic][1/5] feat: add new unit test for testing file-diff infra #280
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
Conversation
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.
LGTM with location comments addressed.
src/test/java/com/google/api/generator/gapic/composer/FileDiffInfraDummyTest.java
Show resolved
Hide resolved
src/test/java/com/google/api/generator/gapic/composer/FileDiffInfraDummyTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/api/generator/gapic/composer/goldens/BUILD.bazel
Show resolved
Hide resolved
// TODO(xiaozhenliu): remove this test class once the file-diff infra is in place and well-tested. | ||
@Test | ||
public void simpleClass() { | ||
ClassDefinition classDef = |
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 removed the composer layer in the test class, only testing classDef node. Because it's not in gapic/composer folder any more, and the GapicClass/addApacheLicense is package visible. So Apache License is manually added here to avoid reusing the helper from composer folder.
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.
SGTM.
assertEquals(visitor.write(), EXPECTED_CLASS_STRING_WITH_HEADER); | ||
} | ||
|
||
private static final String APACHE_LICENSE_STRING = |
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 think we need to make this string as one of gapic component since it will be used in every file. @miraleung @xiaozhenliu-gg5 LMK what do you think, I could help with this.
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.
Since this is just a temporary test, the redefinition here is fine. Other usages will leverage the constant that's defined in CommentComposer.
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.
Thanks for explanation. As Mira mentioned above, we have the helper to add Apache License as one composer component. And this dummy test will be removed after file-diff infra is in place.
Overall LGTM |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.api:api-common](https://togithub.com/googleapis/api-common-java) | `2.1.3` -> `2.1.4` | [](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/api-common-java</summary> ### [`v2.1.4`](https://togithub.com/googleapis/api-common-java/blob/HEAD/CHANGELOG.md#​214-httpsgithubcomgoogleapisapi-common-javacomparev213v214-2022-02-07) </details> --- ### Configuration π **Schedule**: At any time (no schedule defined). π¦ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. π **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-iam).
π€ I have created a release *beep* *boop* --- ### [1.2.3](googleapis/java-iam@v1.2.2...v1.2.3) (2022-02-08) ### Dependencies * update dependency com.google.api:api-common to v2.1.4 ([#280](googleapis/java-iam#280)) ([e0a63a4](googleapis/java-iam@e0a63a4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* chore: update cloud-rad buckets doclava v2 => staging docFX v3 => prod Source-Author: Emily Ball <[email protected]> Source-Date: Tue Feb 16 17:02:08 2021 -0800 Source-Repo: googleapis/synthtool Source-Sha: b416a7befcdbc42de41cf387dcf428f894fb812b Source-Link: googleapis/synthtool@b416a7b * fix: don't log downloads @chingor13 This change keeps Maven 3.6.1 and later from spamming our CI logs with page after page of lists of artifacts it's downloading that makes it much harder to find the actual test output. Source-Author: Elliotte Rusty Harold <[email protected]> Source-Date: Thu Feb 18 19:58:59 2021 +0000 Source-Repo: googleapis/synthtool Source-Sha: 1aeca92e4a38f47134cb955f52ea76f84f09ff88 Source-Link: googleapis/synthtool@1aeca92 * build: reduce download junk in log files * fix: less download junk log files * Update build.sh Source-Author: Elliotte Rusty Harold <[email protected]> Source-Date: Fri Feb 19 01:42:29 2021 +0000 Source-Repo: googleapis/synthtool Source-Sha: 6946fd71ae9215b0e7ae188f5057df765ee6d7d2 Source-Link: googleapis/synthtool@6946fd7
This PR was generated using Autosynth. π Synth log will be available here: https://source.cloud.google.com/results/invocations/007dd233-24d5-46ec-9c0d-21d16baa9e81/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@80003a3 Source-Link: googleapis/synthtool@538a680 Source-Link: googleapis/synthtool@019c716 Source-Link: googleapis/synthtool@968465a
Find more details in design doc: go/java-micro-file-diff-infra
The following step would be: