-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: add fragment tests #1056
feat: add fragment tests #1056
Conversation
Fragment tests are defined by a small proto file describing an API surface with characteristics such that it is desirable to test the generated surface for correctness or to prevent regressions. As part of a fragment test, the generator is run on a fragment to create a GAPIC library for the fragment. The generated unit tests for the fragment are then executed to test the surface.
602aa74
to
307a95e
Compare
Within a session, e.g. Python 3.9, all fragment GAPICs are generated and tested concurrently.
307a95e
to
0033054
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The golden files seem to need updating.
option java_package = "com.google.api"; | ||
option objc_class_prefix = "GAPI"; | ||
|
||
extend google.protobuf.MethodOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these proto files from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied them from googleapis and protobuf. My original idea was something complicated involving a hand-rolled semaphore/caching system to pull those repos as dependencies before running the fragment tests. I realized that was way too complicated, however, and just copied the three files I needed for these fragments.
🤖 I have created a release \*beep\* \*boop\* --- ## [0.55.0](https://www.github.com/googleapis/gapic-generator-python/compare/v0.54.0...v0.55.0) (2021-11-01) ### Features * add fragment tests ([#1056](https://www.github.com/googleapis/gapic-generator-python/issues/1056)) ([9d9b33d](https://www.github.com/googleapis/gapic-generator-python/commit/9d9b33dadf587a6d0b09031edeea597d6d2eae62)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.
As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.
Includes fragment tests and fixes for #413 and #414 as well as fragment tests for various other previously fixed issues.
Note: the parallelization of the fragment tests is currently a standalone commit and can be removed. It dramatically speeds up execution, however, since most of the time spent per fragment is waiting on I/O or subprocesses.