File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797 bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest
9898 ```
9999
100- - Update goldens files based on code generation in unit test, for example
101- `JavaCodeGeneratorTest.java`
102-
103- ```sh
104- bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest_update
105- ```
106-
107100- Run a single integration test for API like `Redis`, it generates Java source
108101 code using the Java microgenerator and compares them with the goldens files
109102 in `test/integration/goldens/redis`.
112105 bazel test //test/integration:redis
113106 ```
114107
115- - Update goldens files based on code generation in integration test, for
116- example `Redis`. It generates Java source code using the Java microgenerator
117- and overwrites the goldens files in `test/integration/goldens/redis` based
118- on code generation.
108+ - Run all unit and integration tests.
109+
110+ ```sh
111+ bazel test $(bazel query "src/test/..." | grep "Test$") //test/integration/...
112+ ```
113+
114+ - Update unit test golden files, for example `JavaCodeGeneratorTest.java`:
115+
116+ ```sh
117+ bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest_update
118+ ```
119+
120+ - Update integration test golden files, for example `Redis`. This clobbers all the
121+ files in `test/integration/goldens/redis`.
119122
120123 ```sh
121124 bazel run //test/integration:redis_update
You can’t perform that action at this time.
0 commit comments