-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: consistent use of bazelisk over bazel in docs (#1281)
* chore: consistent use of bazelisk over bazel * chore: DEVELOPMENT.md already has bazelisk --------- Co-authored-by: Tomo Suzuki <[email protected]> Co-authored-by: Tomo Suzuki <[email protected]>
- Loading branch information
1 parent
1fc7cec
commit 1d94cda
Showing
1 changed file
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
# Goldens Files For Integration Test | ||
|
||
This folder contains goldens files that are expected to be generated from Java Microgenerator | ||
against different APIs. For example `redis` folder has all the Java source files in the generated | ||
against different APIs. For example `redis` folder has all the Java source files in the generated | ||
Redis client library. They are all actual Java files, but used as goldens. | ||
|
||
## Purpose | ||
|
||
When running integration test for the Java Microgenerator using the below command, | ||
the goldens files in this folder will be used to compare with the actual generated Java source files. | ||
When running integration test for the Java Microgenerator using the below command, | ||
the goldens files in this folder will be used to compare with the actual generated Java source | ||
files. | ||
If they are not identical, then the integration test will fail. | ||
|
||
```sh | ||
bazel test //test/integration:redis | ||
bazelisk test //test/integration:redis | ||
``` | ||
|
||
## How To Update Goldens | ||
|
||
If the actual generated Java source files are not identical with the goldens files, and we want to | ||
update the goldens using source files. Run the command below to overwrite the goldens files in `redis` folder. | ||
update the goldens using source files. Run the command below to overwrite the goldens files | ||
in `redis` folder. | ||
|
||
```sh | ||
bazel run //test/integration:update_redis | ||
bazelisk run //test/integration:update_redis | ||
``` | ||
|
||
## Adding new integration tests | ||
|
||
If you are adding a new API for integration testing, be sure to add it in the `BUILD.bazel` under the `Integration Test Rules` and add the `java_gapic_test` rules for the new API under the `API Library Rules` section. | ||
If you are adding a new API for integration testing, be sure to add it in the `BUILD.bazel` under | ||
the `Integration Test Rules` and add the `java_gapic_test` rules for the new API under | ||
the `API Library Rules` section. | ||
|
||
You need to manually create a new directory for your new API under the `test/integration/goldens` with the same name you've used for the `Integration Test Rules`. Then when you run the command to update goldens (above), it will automatically create the goldens needed. | ||
You need to manually create a new directory for your new API under the `test/integration/goldens` | ||
with the same name you've used for the `Integration Test Rules`. Then when you run the command to | ||
update goldens (above), it will automatically create the goldens needed. |