-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Tavern GRPC support #438
Merged
Merged
Tavern GRPC support #438
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
# Conflicts: # setup.cfg # tavern/core.py # tests/unit/conftest.py # tox-integration.ini
Sorry for not leaving a comment on this earlier, but as mentioned in #419 (comment) I don't really want to merge something in that I won't be able to maintain. What we could do is put this as a 'tavern-grpc' plugin into a separate repository under the 'taverntesting' github organisation, and add the schema and a 'stub' implementation in Tavern that just raises an error and points to that repository? |
Add v2/v3 for other tests fix reflection Options
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GRPC client support.
GRPC client connection is described using
host
,port
,tls
.On stage level,
grpc_request
create a request with thebody
.service
is the full GRPC service name. Besides, there is a possibility to change thehost
inside request:Similar to http
response
GRPC plugin hasgrpc_response
.To verify error code you can use
status
anddetail
:The main problem with GRPC what client should know the protobuf message to make request and read the response.
GRPC plugin supports several features to discover protobuf message structure:
The tavern will automatically compile protos and start using them.
2. In case you already have Python generated classes (
protoc
output https://developers.google.com/protocol-buffers/docs/pythontutorial). Setup the proto module location.Using proto
source
file actually generate GRPC python file inside the default module (proto
) folder. But you can change it update module to custome name.proto
section.To send metadata with request GRPC has
metadata
map.