Skip to content
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

[ggj][infra][1/5] integration-test: add goldens files for Redis client library #378

Merged
merged 16 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/integration/goldens/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Goldens Files For Integration Test

This folder contains goldens files that are expected to be generated from Java Microgenerator
against differenct 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.
If they are not identical, then the integration test will fail.

```sh
bazel test //test/integration:redis_java_gapic
```

## 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.

```sh
bazel run //test/integration:redis_goldens_update
```
6 changes: 6 additions & 0 deletions test/integration/goldens/redis/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob(["*.java"]),
)
951 changes: 951 additions & 0 deletions test/integration/goldens/redis/CloudRedisClient.java

Large diffs are not rendered by default.

Loading