-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Gripmock for grpc mocking #6
base: main
Are you sure you want to change the base?
Conversation
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.
Worth a call maybe, but I think curling proto-include.tar.gz from a configured release is the best way to get the google & grpc headers now. Even in docker builds
&& rm -rf protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip | ||
|
||
# Download common google api proto files. | ||
ENV GOOGLE_COMMON_PROTOS_VERSION=1.50.0 |
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.
These are present in the proto-include.tar.gz included on every release. the runes to install both the google headers and the grpc onese are just
rm -rf proto-include
curl -fsSOL https://github.com/datatrails/go-datatrails-common-api/releases/download/{{.DATATRAILS_COMMON_API_VERSION}}/proto-include.tar.gz
tar -zxf proto-include.tar.gz
rm proto-include.tar.gz
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 avid taskfiles/Taskfile_apis.yml bootstrap step is a good reference
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.
Love it. May want to huddle re use of proto-include.tar.gz
## Run gRPC mock server | ||
|
||
``` | ||
docker run -p 4770:4770 -p 4771:4771 -v ~/workspace/go-datatrails-common-api:/protobuf -v ~/workspace/go-datatrails-common-api:/proto gripmock --imports=/protobuf,/usr/local/api-common-protos-master,/usr/local/include,/go/pkg/mod/github.com/envoyproxy/[email protected],/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway/[email protected] /proto/datatrails-common-api/assets/v2/assets/service.proto |
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.
if you use the proto-includes.tar these include paths get a lot simpler
No description provided.