This directory contains test resources for the gapic generator gems, including the "golden" outputs used as the principal test cases. Specifically includes:
- Repository submodules for source protos in the
googleapisdirectory - Input protos for test cases that are not part of
googleapis, in theprotosdirectory - Configuration files for golden outputs in the
configdirectory andgem_defaults.rbfile - Proto input in binary format in the
inputdirectory, which can be fed directly into the generator plugin without runningprotoc - Test inputs for the legacy samplegen system in the
samplesdirectory - Test inputs for snippetgen in the
snippet_configdirectory - Golden outputs themselves in the
outputdirectory - Runtime tests of generated golden outputs in the
testdirectory
Regenerate all golden outputs by running:
$ cd shared
$ bundle install
$ toys genYou can regenerate golden outputs for specific golden services by passing them
as arguments to toys gen. You can also specify which generator to use.
$ cd shared
$ bundle install
$ toys gen --generator=cloud vision_v1Regenerate all binary input files by running:
$ cd shared
$ bundle install
$ toys binYou can regenerate binary inputs for specific golden services by passing them
as arguments to toys bin. You can also specify which generator to use.
$ cd shared
$ bundle install
$ toys bin --generator=cloud vision_v1This project includes a functional test suite for the Ruby GAPIC generator. See Showcase for more details.
$ cd shared
$ bundle install
$ toys test showcaseThere are also a set of functional tests that use the vision golden output:
$ cd shared
$ bundle install
$ toys test visionYou can also run CI (test, rubocop, yard) on all generated goldens:
$ cd shared
$ bundle install
$ toys test outputRun all above tests by:
$ cd shared
$ bundle install
$ toys test