Skip to content

Commit

Permalink
[ggj][infra][1/5] integration-test: add goldens files for Redis clien…
Browse files Browse the repository at this point in the history
…t library (#378)

* add goldens files for redis client lib

* add bazel file

* format

* add todo comment for Redis client lib goldens

* add README to integration test goldens folder

* update redis goldens using micro

* remove package-info

* rename
  • Loading branch information
xiaozhenliu-gg5 authored Oct 13, 2020
1 parent aa3c348 commit f0f1dd2
Show file tree
Hide file tree
Showing 13 changed files with 4,425 additions and 0 deletions.
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

0 comments on commit f0f1dd2

Please sign in to comment.