Skip to content
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 tests for omitted message in connect error #922

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ testCases:
error:
code: CODE_UNAVAILABLE
message: oops
- request:
# The message property is optional - it can be omitted or be an empty string
testName: error/missing-message
service: connectrpc.conformance.v1.ConformanceService
method: Unary
streamType: STREAM_TYPE_UNARY
requestMessages:
- "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest
responseDefinition:
rawResponse:
statusCode: 401
headers:
- name: content-type
value: [ "application/json" ]
unary:
text: |
{ "code": "unauthenticated" }
expectedResponse:
error:
code: CODE_UNAUTHENTICATED
- request:
testName: error/allow-unrecognized-fields
service: connectrpc.conformance.v1.ConformanceService
Expand Down Expand Up @@ -273,6 +293,31 @@ testCases:
error:
code: CODE_UNKNOWN
message: oops
- request:
# The message property is optional - it can be omitted or be an empty string
testName: end-stream/missing-message
service: connectrpc.conformance.v1.ConformanceService
method: ServerStream
streamType: STREAM_TYPE_SERVER_STREAM
requestMessages:
- "@type": type.googleapis.com/connectrpc.conformance.v1.ServerStreamRequest
responseDefinition:
rawResponse:
statusCode: 200
headers:
- name: content-type
value: [ "application/connect+proto" ]
stream:
items:
- flags: 2
payload:
text: |
{
"error": { "code": "unauthenticated" }
}
expectedResponse:
error:
code: CODE_UNAUTHENTICATED
- request:
testName: end-stream/allow-unrecognized-fields
service: connectrpc.conformance.v1.ConformanceService
Expand Down
Loading