From bb12d5098c3bc64f72541de2289c3d76944f4ed1 Mon Sep 17 00:00:00 2001 From: Mira Leung Date: Fri, 6 Aug 2021 11:31:43 -0700 Subject: [PATCH] docs(engx): clean up dev docs, add convenience commands --- DEVELOPMENT.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 144b904963..8cd12949a0 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -97,13 +97,6 @@ bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest ``` -- Update goldens files based on code generation in unit test, for example - `JavaCodeGeneratorTest.java` - - ```sh - bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest_update - ``` - - Run a single integration test for API like `Redis`, it generates Java source code using the Java microgenerator and compares them with the goldens files in `test/integration/goldens/redis`. @@ -112,10 +105,20 @@ bazel test //test/integration:redis ``` -- Update goldens files based on code generation in integration test, for - example `Redis`. It generates Java source code using the Java microgenerator - and overwrites the goldens files in `test/integration/goldens/redis` based - on code generation. +- Run all unit and integration tests. + + ```sh + bazel test $(bazel query "src/test/..." | grep "Test$") //test/integration/... + ``` + +- Update unit test golden files, for example `JavaCodeGeneratorTest.java`: + + ```sh + bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest_update + ``` + +- Update integration test golden files, for example `Redis`. This clobbers all the + files in `test/integration/goldens/redis`. ```sh bazel run //test/integration:redis_update