From 78337a436fbe2e9ad7be24ee2eeb058f622a1d08 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:45:37 -0400 Subject: [PATCH 01/10] reconcile test cases w/ latest spec changes --- go.mod | 2 +- go.sum | 4 +- ....yaml => client_http_to_connect_code.yaml} | 66 ++++++++----------- .../connect_client_code_to_http_code.yaml | 8 +-- .../data/connect_client_error_endstream.yaml | 49 +++++++------- .../data/connect_client_unexpected.yaml | 6 +- ...d.yaml.disabled => server_unexpected.yaml} | 3 - testing/grpcserver-web-known-failing.txt | 10 ++- testing/grpcwebclient-known-failing.txt | 14 ++++ 9 files changed, 82 insertions(+), 80 deletions(-) rename internal/app/connectconformance/testsuites/data/{connect_client_http_to_connect_code.yaml => client_http_to_connect_code.yaml} (80%) rename internal/app/connectconformance/testsuites/data/{server_unexpected.yaml.disabled => server_unexpected.yaml} (74%) diff --git a/go.mod b/go.mod index e5b768fd..dea241cf 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module connectrpc.com/conformance go 1.20 require ( - connectrpc.com/connect v1.15.0 + connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0 github.com/andybalholm/brotli v1.1.0 github.com/bufbuild/protoyaml-go v0.1.8 github.com/golang/snappy v0.0.4 diff --git a/go.sum b/go.sum index 3f99e5b6..bd3d5519 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-2023110619213 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231106192134-1baebb0a1518.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -connectrpc.com/connect v1.15.0 h1:lFdeCbZrVVDydAqwr4xGV2y+ULn+0Z73s5JBj2LikWo= -connectrpc.com/connect v1.15.0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= +connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0 h1:O+k+ZPPgXw0iYTVo1BoKAPLLz9/ADWcFlv+SlqF2Ago= +connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= diff --git a/internal/app/connectconformance/testsuites/data/connect_client_http_to_connect_code.yaml b/internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml similarity index 80% rename from internal/app/connectconformance/testsuites/data/connect_client_http_to_connect_code.yaml rename to internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml index 9754b01a..7daa8747 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_http_to_connect_code.yaml +++ b/internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml @@ -1,16 +1,10 @@ name: HTTP to Connect Code Mapping # If a server returns a non-200 HTTP code for unary requests without an -# explicit Connect error code, the client must synthesize an RPC code +# explicit RPC error code, the client must synthesize an RPC code # from the HTTP code. These tests cases verify that mapping by forcing # the server to return a specified HTTP code and then test whether the # client correctly returns the required RPC code. -# -# TODO: Remove relevant protocols once the Connect code mapping table -# is updated to align with gRPC. -## https://github.com/connectrpc/connectrpc.com/pull/130 mode: TEST_MODE_CLIENT -relevantProtocols: - - PROTOCOL_CONNECT testCases: - request: testName: bad-request @@ -18,12 +12,11 @@ testCases: requestMessages: - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest responseDefinition: - responseData: "dGVzdCByZXNwb25zZQ==" rawResponse: statusCode: 400 expectedResponse: error: - code: CODE_INVALID_ARGUMENT + code: CODE_INTERNAL - request: testName: unauthorized streamType: STREAM_TYPE_UNARY @@ -57,17 +50,6 @@ testCases: expectedResponse: error: code: CODE_UNIMPLEMENTED -- request: - testName: request-timeout - streamType: STREAM_TYPE_UNARY - requestMessages: - - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest - responseDefinition: - rawResponse: - statusCode: 408 - expectedResponse: - error: - code: CODE_DEADLINE_EXCEEDED - request: testName: conflict streamType: STREAM_TYPE_UNARY @@ -78,7 +60,7 @@ testCases: statusCode: 409 expectedResponse: error: - code: CODE_ABORTED + code: CODE_UNKNOWN - request: testName: precondition-failed streamType: STREAM_TYPE_UNARY @@ -89,7 +71,7 @@ testCases: statusCode: 412 expectedResponse: error: - code: CODE_FAILED_PRECONDITION + code: CODE_UNKNOWN - request: testName: payload-too-large streamType: STREAM_TYPE_UNARY @@ -100,20 +82,18 @@ testCases: statusCode: 413 expectedResponse: error: - code: CODE_RESOURCE_EXHAUSTED -# TODO - uncomment when conformance is updated to the latest release of connect-go -# that includes this fix -# - request: -# testName: unsupported media type -# streamType: STREAM_TYPE_UNARY -# requestMessages: -# - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest -# responseDefinition: -# rawResponse: -# statusCode: 415 -# expectedResponse: -# error: -# code: CODE_INTERNAL + code: CODE_UNKNOWN +- request: + testName: unsupported media type + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + responseDefinition: + rawResponse: + statusCode: 415 + expectedResponse: + error: + code: CODE_UNKNOWN - request: testName: too-many-requests streamType: STREAM_TYPE_UNARY @@ -135,7 +115,7 @@ testCases: statusCode: 431 expectedResponse: error: - code: CODE_RESOURCE_EXHAUSTED + code: CODE_UNKNOWN - request: testName: bad-gateway streamType: STREAM_TYPE_UNARY @@ -169,4 +149,14 @@ testCases: expectedResponse: error: code: CODE_UNAVAILABLE - +- request: + testName: http-version-not-supported + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + responseDefinition: + rawResponse: + statusCode: 505 + expectedResponse: + error: + code: CODE_UNKNOWN diff --git a/internal/app/connectconformance/testsuites/data/connect_client_code_to_http_code.yaml b/internal/app/connectconformance/testsuites/data/connect_client_code_to_http_code.yaml index 148a3e4e..02c16ef2 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_code_to_http_code.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_client_code_to_http_code.yaml @@ -14,7 +14,7 @@ testCases: error: code: CODE_CANCELED expectedResponse: - httpStatusCode: 408 + httpStatusCode: 499 error: code: CODE_CANCELED details: @@ -71,7 +71,7 @@ testCases: error: code: CODE_DEADLINE_EXCEEDED expectedResponse: - httpStatusCode: 408 + httpStatusCode: 504 error: code: CODE_DEADLINE_EXCEEDED details: @@ -166,7 +166,7 @@ testCases: error: code: CODE_FAILED_PRECONDITION expectedResponse: - httpStatusCode: 412 + httpStatusCode: 400 error: code: CODE_FAILED_PRECONDITION details: @@ -223,7 +223,7 @@ testCases: error: code: CODE_UNIMPLEMENTED expectedResponse: - httpStatusCode: 404 + httpStatusCode: 501 error: code: CODE_UNIMPLEMENTED details: diff --git a/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml b/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml index cab449bf..9bc5fb79 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml @@ -22,7 +22,7 @@ testCases: text: "null" expectedResponse: error: - code: CODE_UNKNOWN + code: CODE_UNAUTHENTICATED - request: testName: error/null-code service: connectrpc.conformance.v1.ConformanceService @@ -41,7 +41,7 @@ testCases: { "code": null, "message": "oops" } expectedResponse: error: - code: CODE_UNKNOWN + code: CODE_UNAUTHENTICATED message: oops - request: testName: error/missing-code @@ -61,31 +61,28 @@ testCases: { "message": "oops" } expectedResponse: error: - code: CODE_UNKNOWN + code: CODE_UNAUTHENTICATED + message: oops + - request: + testName: error/unrecognized-code + service: connectrpc.conformance.v1.ConformanceService + method: Unary + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + responseDefinition: + rawResponse: + statusCode: 429 + headers: + - name: content-type + value: [ "application/json" ] + unary: + text: | + { "code": "foobar", "message": "oops" } + expectedResponse: + error: + code: CODE_UNAVAILABLE message: oops - -# # TODO: uncomment this once connect-go can de-serialize the -# # rest of the JSON in the face of an invalid code -# - request: -# testName: error/unrecognized-code -# service: connectrpc.conformance.v1.ConformanceService -# method: Unary -# streamType: STREAM_TYPE_UNARY -# requestMessages: -# - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest -# responseDefinition: -# rawResponse: -# statusCode: 422 -# headers: -# - name: content-type -# value: [ "application/json" ] -# unary: -# text: | -# { "code": "foobar", "message": "oops" } -# expectedResponse: -# error: -# code: CODE_UNKNOWN -# message: oops - request: testName: error/allow-unrecognized-fields service: connectrpc.conformance.v1.ConformanceService diff --git a/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml b/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml index 478ebafb..10be7064 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml @@ -14,7 +14,7 @@ testCases: - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest responseDefinition: rawResponse: - statusCode: 412 + statusCode: 403 headers: - name: content-type value: [ "application/proto" ] @@ -22,8 +22,8 @@ testCases: binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryResponse"} expectedResponse: error: - # mapped from 412 status code (invalid body ignored) - code: CODE_FAILED_PRECONDITION + # mapped from 403 status code (invalid body ignored) + code: CODE_PERMISSION_DENIED - request: testName: client-stream/ok-but-no-response diff --git a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml.disabled b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml similarity index 74% rename from internal/app/connectconformance/testsuites/data/server_unexpected.yaml.disabled rename to internal/app/connectconformance/testsuites/data/server_unexpected.yaml index f554d839..21c81963 100644 --- a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml.disabled +++ b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml @@ -1,6 +1,3 @@ -# TODO: remove the ".disabled" extension from this file once Connect's HTTP -> Code -# mapping has been reconciled with gRPC. Until then, this test case fails. -# https://github.com/connectrpc/connectrpc.com/pull/130 name: Server Unexpected Requests mode: TEST_MODE_SERVER relevantCompressions: diff --git a/testing/grpcserver-web-known-failing.txt b/testing/grpcserver-web-known-failing.txt index c3c2f1f1..b670d7a6 100644 --- a/testing/grpcserver-web-known-failing.txt +++ b/testing/grpcserver-web-known-failing.txt @@ -1,6 +1,10 @@ - # This returns 400 instead of 405. This is an inconsistency in grpc-go. - # https://github.com/grpc/grpc-go/pull/6989 - gRPC-Web Unexpected Requests/**/unexpected-verb +# These return 400 instead of 405 and 415. This is an inconsistency in grpc-go +# between using its builtin HTTP/2 implementation vs. using net/http. So the +# normal grpc protocol works (using the former); it's just grpc-web that does not. +# These will be fixed in the next release of grpc-go: +# https://github.com/grpc/grpc-go/pull/6989 +gRPC-Web Unexpected Requests/**/unexpected-verb +Server Unexpected Requests/HTTPVersion:1/**/unexpected content type # The entries for "cardinality violation" in the following doc indicate that # these cases should fail with "unimplemented": diff --git a/testing/grpcwebclient-known-failing.txt b/testing/grpcwebclient-known-failing.txt index 1e6b15a4..c0b33964 100644 --- a/testing/grpcwebclient-known-failing.txt +++ b/testing/grpcwebclient-known-failing.txt @@ -21,3 +21,17 @@ gRPC-Web Unexpected Responses/**/unexpected-compressed-message gRPC-Web Unexpected Responses/**/unexpected-compression gRPC-Web Unexpected Responses/**/multiple-responses gRPC-Web Unexpected Responses/**/ok-but-no-response + +# The gRPC-Web client does not appear to actually implement the HTTP to gRPC status code +# mapping described in this part of the spec: +# https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md +# Instead, it always returns an "unknown" code if the response does not include a +# grpc-status header/trailer key. +HTTP to Connect Code Mapping/**/bad-gateway +HTTP to Connect Code Mapping/**/bad-request +HTTP to Connect Code Mapping/**/forbidden +HTTP to Connect Code Mapping/**/gateway-timeout +HTTP to Connect Code Mapping/**/not-found +HTTP to Connect Code Mapping/**/service-unavailable +HTTP to Connect Code Mapping/**/too-many-requests +HTTP to Connect Code Mapping/**/unauthorized From bcba62280725886152da35a637bafd2dd454eecb Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:54:48 -0400 Subject: [PATCH 02/10] also update w/ fixes to cardinality violation test cases --- go.mod | 4 ++-- go.sum | 8 ++++---- testing/referenceclient-known-failing.txt | 12 +----------- testing/referenceserver-known-failing.txt | 9 +-------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/go.mod b/go.mod index dea241cf..88a19737 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module connectrpc.com/conformance go 1.20 require ( - connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0 + connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4 github.com/andybalholm/brotli v1.1.0 github.com/bufbuild/protoyaml-go v0.1.8 github.com/golang/snappy v0.0.4 @@ -20,7 +20,7 @@ require ( golang.org/x/sync v0.6.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 google.golang.org/grpc v1.62.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 ) require ( diff --git a/go.sum b/go.sum index bd3d5519..d2d6281a 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-2023110619213 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231106192134-1baebb0a1518.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0 h1:O+k+ZPPgXw0iYTVo1BoKAPLLz9/ADWcFlv+SlqF2Ago= -connectrpc.com/connect v1.15.1-0.20240312013426-946e37a1e2d0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= +connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4 h1:SIIcGoeWugMDCh+vln8Ri/HkrEMnOIF/Rj18Yi2W+Os= +connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -543,8 +543,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/testing/referenceclient-known-failing.txt b/testing/referenceclient-known-failing.txt index 26413120..7fc77010 100644 --- a/testing/referenceclient-known-failing.txt +++ b/testing/referenceclient-known-failing.txt @@ -1,11 +1 @@ -# Currently, connect-go returns an "internal" error when either of these occurs. -# However, the gRPC specs state that a problem with message cardinality (where -# a single message is expected but stream actually has a different number), in -# both clients and servers, should be an "unimplemented" error. -# -# Search for "cardinality violation" in this doc: -# https://grpc.github.io/grpc/core/md_doc_statuscodes.html -**/unary/multiple-responses -**/unary/ok-but-no-response -**/client-stream/multiple-responses -**/client-stream/ok-but-no-response \ No newline at end of file +# W00T! There are no known failures in the reference client. \ No newline at end of file diff --git a/testing/referenceserver-known-failing.txt b/testing/referenceserver-known-failing.txt index 54441fe2..76a9a9f7 100644 --- a/testing/referenceserver-known-failing.txt +++ b/testing/referenceserver-known-failing.txt @@ -1,8 +1 @@ -# The entries for "cardinality violation" in the following doc indicate that -# these cases should fail with "unimplemented": -# https://grpc.github.io/grpc/core/md_doc_statuscodes.html -# But the grpc-go client instead fails with "unknown". -**/unary/multiple-requests -**/unary/no-request -**/server-stream/multiple-requests -**/server-stream/no-request +# W00T! There are no known failures in the reference server. \ No newline at end of file From 8cc521a7af81da810269ca8696e383b51052f63d Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:23:03 -0400 Subject: [PATCH 03/10] =?UTF-8?q?fix=20typo=20in=20previous=20PR=20?= =?UTF-8?q?=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../testsuites/data/connect_client_unexpected.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml b/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml index 10be7064..5855bcf5 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_client_unexpected.yaml @@ -43,7 +43,7 @@ testCases: text: | { "code": "out_of_range", - "message": "oops", + "message": "oops" } expectedResponse: error: @@ -74,7 +74,7 @@ testCases: text: | { "code": "out_of_range", - "message": "oops", + "message": "oops" } expectedResponse: error: From 13f1d0b5beefb498cbb65d7b5b675e0dde5ca18d Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:44:45 -0400 Subject: [PATCH 04/10] uncomment other test cases that now work thanks to recent connect-go fixes --- .../data/connect_client_error_endstream.yaml | 52 +++++++++--------- .../data/grpc_server_unexpected.yaml | 53 ++++++++++--------- .../data/grpc_web_server_unexpected.yaml | 49 ++++++++--------- 3 files changed, 77 insertions(+), 77 deletions(-) diff --git a/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml b/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml index 9bc5fb79..c7a85c22 100644 --- a/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_client_error_endstream.yaml @@ -248,33 +248,31 @@ testCases: error: code: CODE_UNKNOWN message: oops -# # TODO: uncomment this once connect-go can de-serialize the -# # rest of the JSON in the face of an invalid code -# - request: -# testName: end-stream/unrecognized-code -# 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": "foobar", "message": "oops" } -# } -# expectedResponse: -# error: -# code: CODE_UNKNOWN -# message: oops + - request: + testName: end-stream/unrecognized-code + 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": "foobar", "message": "oops" } + } + expectedResponse: + error: + code: CODE_UNKNOWN + message: oops - request: testName: end-stream/allow-unrecognized-fields service: connectrpc.conformance.v1.ConformanceService diff --git a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml index c3dbe89f..54e3cb1e 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml @@ -128,32 +128,33 @@ testCases: expectedResponse: error: code: CODE_UNIMPLEMENTED -## TODO: uncomment this test case once connect-go distinguishes between unknown -## (content-type that is clearly not an RPC client, can send back 415 status) -## and internal (looks like an RPC client, but unsupported codec, so send -## back RPC error response). -## https://github.com/connectrpc/connect-go/issues/689 -# - request: -# testName: unexpected codec -# streamType: STREAM_TYPE_UNARY -# requestMessages: -# - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest -# rawRequest: -# verb: POST -# uri: /connectrpc.conformance.v1.ConformanceService/Unary -# headers: -# - name: content-type -# value: [ "application/grpc+foo" ] -# - name: te -# value: [ "trailers" ] -# stream: -# items: -# - flags: 0 -# payload: -# binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} -# expectedResponse: -# error: -# code: CODE_INTERNAL + - request: + testName: unexpected codec + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + rawRequest: + verb: POST + uri: /connectrpc.conformance.v1.ConformanceService/Unary + headers: + - name: content-type + value: [ "application/grpc+foo" ] + - name: te + value: [ "trailers" ] + stream: + items: + - flags: 0 + payload: + binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED + expectedResponse: + error: + code: CODE_UNKNOWN - request: testName: unexpected-compression streamType: STREAM_TYPE_UNARY diff --git a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml index 6b14c3f0..911ce15b 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml @@ -124,30 +124,31 @@ testCases: expectedResponse: error: code: CODE_UNIMPLEMENTED - ## TODO: uncomment this test case once connect-go distinguishes between unknown - ## (content-type that is clearly not an RPC client, can send back 415 status) - ## and internal (looks like an RPC client, but unsupported codec, so send - ## back RPC error response). - ## https://github.com/connectrpc/connect-go/issues/689 - # - request: - # testName: unexpected-codec - # streamType: STREAM_TYPE_UNARY - # requestMessages: - # - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest - # rawRequest: - # verb: POST - # uri: /connectrpc.conformance.v1.ConformanceService/Unary - # headers: - # - name: content-type - # value: [ "application/grpc-web+foo" ] - # stream: - # items: - # - flags: 0 - # payload: - # binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} - # expectedResponse: - # error: - # code: CODE_INTERNAL + - request: + testName: unexpected-codec + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + rawRequest: + verb: POST + uri: /connectrpc.conformance.v1.ConformanceService/Unary + headers: + - name: content-type + value: [ "application/grpc-web+foo" ] + stream: + items: + - flags: 0 + payload: + binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED + expectedResponse: + error: + code: CODE_UNKNOWN - request: testName: unexpected-compression streamType: STREAM_TYPE_UNARY From b62695e02bd9761fbc3999420da9500581ac9e81 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:02:06 -0400 Subject: [PATCH 05/10] relax expectation around some other unspecified gRPC error cases; fix up known failing for grpcserver w/ grpc-web accordingly --- .../data/grpc_server_unexpected.yaml | 10 +++++++- .../data/grpc_web_server_unexpected.yaml | 10 +++++++- .../testsuites/data/server_unexpected.yaml | 13 +++++++--- testing/grpcserver-web-known-failing.txt | 24 +++++++------------ 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml index 54e3cb1e..2515273a 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml @@ -103,10 +103,18 @@ testCases: - flags: 0 payload: binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED expectedResponse: - httpStatusCode: 405 + # Ideally, the server would return a 405. But it's not actually specified :/ + # httpStatusCode: 405 error: code: CODE_UNKNOWN + - request: testName: unexpected-uri streamType: STREAM_TYPE_UNARY diff --git a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml index 911ce15b..c28c49cd 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml @@ -101,10 +101,18 @@ testCases: - flags: 0 payload: binary_message: { "@type": "type.googleapis.com/connectrpc.conformance.v1.UnaryRequest"} + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED expectedResponse: - httpStatusCode: 405 + # Ideally, the server would return a 405. But it's not actually specified :/ + # httpStatusCode: 405 error: code: CODE_UNKNOWN + - request: testName: unexpected-uri streamType: STREAM_TYPE_UNARY diff --git a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml index 21c81963..e9869ce7 100644 --- a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml @@ -6,7 +6,7 @@ relevantCodecs: - CODEC_PROTO testCases: - request: - testName: unexpected content type + testName: unexpected-content-type streamType: STREAM_TYPE_UNARY requestMessages: - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest @@ -18,7 +18,14 @@ testCases: value: [ "image/jpeg" ] unary: binary: "12345678" + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED expectedResponse: - httpStatusCode: 415 + # Ideally, the server would return a 415. But it's not actually specified :/ + # httpStatusCode: 415 error: - code: CODE_UNKNOWN \ No newline at end of file + code: CODE_UNKNOWN diff --git a/testing/grpcserver-web-known-failing.txt b/testing/grpcserver-web-known-failing.txt index b670d7a6..54441fe2 100644 --- a/testing/grpcserver-web-known-failing.txt +++ b/testing/grpcserver-web-known-failing.txt @@ -1,16 +1,8 @@ -# These return 400 instead of 405 and 415. This is an inconsistency in grpc-go -# between using its builtin HTTP/2 implementation vs. using net/http. So the -# normal grpc protocol works (using the former); it's just grpc-web that does not. -# These will be fixed in the next release of grpc-go: -# https://github.com/grpc/grpc-go/pull/6989 -gRPC-Web Unexpected Requests/**/unexpected-verb -Server Unexpected Requests/HTTPVersion:1/**/unexpected content type - - # The entries for "cardinality violation" in the following doc indicate that - # these cases should fail with "unimplemented": - # https://grpc.github.io/grpc/core/md_doc_statuscodes.html - # But the grpc-go client instead fails with "unknown". - **/unary/multiple-requests - **/unary/no-request - **/server-stream/multiple-requests - **/server-stream/no-request +# The entries for "cardinality violation" in the following doc indicate that +# these cases should fail with "unimplemented": +# https://grpc.github.io/grpc/core/md_doc_statuscodes.html +# But the grpc-go client instead fails with "unknown". +**/unary/multiple-requests +**/unary/no-request +**/server-stream/multiple-requests +**/server-stream/no-request From bce640206f749778af68ff7cabf8e32e7f14887a Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:03:53 -0400 Subject: [PATCH 06/10] rename file and test suite since these aren't connect-specific cases anymore --- ...ct_code.yaml => client_http_to_rpc_code.yaml} | 2 +- testing/grpcwebclient-known-failing.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) rename internal/app/connectconformance/testsuites/data/{client_http_to_connect_code.yaml => client_http_to_rpc_code.yaml} (99%) diff --git a/internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml b/internal/app/connectconformance/testsuites/data/client_http_to_rpc_code.yaml similarity index 99% rename from internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml rename to internal/app/connectconformance/testsuites/data/client_http_to_rpc_code.yaml index 7daa8747..03ce0be9 100644 --- a/internal/app/connectconformance/testsuites/data/client_http_to_connect_code.yaml +++ b/internal/app/connectconformance/testsuites/data/client_http_to_rpc_code.yaml @@ -1,4 +1,4 @@ -name: HTTP to Connect Code Mapping +name: HTTP to RPC Code Mapping # If a server returns a non-200 HTTP code for unary requests without an # explicit RPC error code, the client must synthesize an RPC code # from the HTTP code. These tests cases verify that mapping by forcing diff --git a/testing/grpcwebclient-known-failing.txt b/testing/grpcwebclient-known-failing.txt index c0b33964..c1ab922e 100644 --- a/testing/grpcwebclient-known-failing.txt +++ b/testing/grpcwebclient-known-failing.txt @@ -27,11 +27,11 @@ gRPC-Web Unexpected Responses/**/ok-but-no-response # https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md # Instead, it always returns an "unknown" code if the response does not include a # grpc-status header/trailer key. -HTTP to Connect Code Mapping/**/bad-gateway -HTTP to Connect Code Mapping/**/bad-request -HTTP to Connect Code Mapping/**/forbidden -HTTP to Connect Code Mapping/**/gateway-timeout -HTTP to Connect Code Mapping/**/not-found -HTTP to Connect Code Mapping/**/service-unavailable -HTTP to Connect Code Mapping/**/too-many-requests -HTTP to Connect Code Mapping/**/unauthorized +HTTP to RPC Code Mapping/**/bad-gateway +HTTP to RPC Code Mapping/**/bad-request +HTTP to RPC Code Mapping/**/forbidden +HTTP to RPC Code Mapping/**/gateway-timeout +HTTP to RPC Code Mapping/**/not-found +HTTP to RPC Code Mapping/**/service-unavailable +HTTP to RPC Code Mapping/**/too-many-requests +HTTP to RPC Code Mapping/**/unauthorized From 0a849aa015f63c22e4269c512fceb6104ed80800 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Wed, 20 Mar 2024 20:14:07 -0400 Subject: [PATCH 07/10] use just-released v1.16.0 of connect-go --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 88a19737..dddee63a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module connectrpc.com/conformance go 1.20 require ( - connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4 + connectrpc.com/connect v1.16.0 github.com/andybalholm/brotli v1.1.0 github.com/bufbuild/protoyaml-go v0.1.8 github.com/golang/snappy v0.0.4 diff --git a/go.sum b/go.sum index d2d6281a..81d3a695 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-2023110619213 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231106192134-1baebb0a1518.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4 h1:SIIcGoeWugMDCh+vln8Ri/HkrEMnOIF/Rj18Yi2W+Os= -connectrpc.com/connect v1.15.1-0.20240318165016-0f46eaa59eb4/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= +connectrpc.com/connect v1.16.0 h1:rdtfQjZ0OyFkWPTegBNcH7cwquGAN1WzyJy80oFNibg= +connectrpc.com/connect v1.16.0/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= From 95e5f83ba6f519fd986a0955b1b26f6fd4c6c933 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Wed, 20 Mar 2024 20:15:40 -0400 Subject: [PATCH 08/10] fix grpc test cases that didn't actually need relaxed error code checks --- .../testsuites/data/grpc_client_unexpected.yaml | 7 +------ .../testsuites/data/grpc_web_client_unexpected.yaml | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/internal/app/connectconformance/testsuites/data/grpc_client_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_client_unexpected.yaml index 2553e0d9..8a7fb1a9 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_client_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_client_unexpected.yaml @@ -183,14 +183,9 @@ testCases: headers: - name: Content-Type value: [ "image/jpeg" ] - otherAllowedErrorCodes: - # Not actually specified what error code to use, but only - # internal and unknown really make any sense. There may be - # an argument for unimplemented, too. - - CODE_INTERNAL - - CODE_UNIMPLEMENTED expectedResponse: error: + # derived from 200 response code code: CODE_UNKNOWN - request: testName: unexpected-codec diff --git a/internal/app/connectconformance/testsuites/data/grpc_web_client_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_web_client_unexpected.yaml index 93b6d178..a4669158 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_web_client_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_web_client_unexpected.yaml @@ -242,14 +242,9 @@ testCases: headers: - name: Content-Type value: [ "image/jpeg" ] - otherAllowedErrorCodes: - # Not actually specified what error code to use, but only - # internal and unknown really make any sense. There may be - # an argument for unimplemented, too. - - CODE_INTERNAL - - CODE_UNIMPLEMENTED expectedResponse: error: + # derived from 200 response code code: CODE_UNKNOWN - request: testName: unexpected-codec From 9b2c34d60f88216303f7217e13c3815bd4330d68 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:05:34 -0400 Subject: [PATCH 09/10] review feedback; splits 'unexpected content-type' test case across protocols so we can be less lenient with connect protocol than grpc/grpc-web --- .../data/connect_server_unexpected.yaml | 18 +++++++++++++ .../data/grpc_server_unexpected.yaml | 25 +++++++++++++++++++ .../data/grpc_web_server_unexpected.yaml | 25 +++++++++++++++++++ .../testsuites/data/server_unexpected.yaml | 25 +------------------ testing/referenceclient-known-failing.txt | 2 +- testing/referenceserver-known-failing.txt | 2 +- 6 files changed, 71 insertions(+), 26 deletions(-) diff --git a/internal/app/connectconformance/testsuites/data/connect_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/connect_server_unexpected.yaml index 719af4b8..9b72279b 100644 --- a/internal/app/connectconformance/testsuites/data/connect_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/connect_server_unexpected.yaml @@ -7,6 +7,24 @@ relevantCompressions: relevantCodecs: - CODEC_PROTO testCases: + - request: + testName: unexpected-content-type + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + rawRequest: + verb: POST + uri: /connectrpc.conformance.v1.ConformanceService/Unary + headers: + - name: content-type + value: [ "image/jpeg" ] + unary: + binary: "12345678" + expectedResponse: + httpStatusCode: 415 + error: + code: CODE_UNKNOWN + - request: testName: server-stream/no-request streamType: STREAM_TYPE_SERVER_STREAM diff --git a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml index 2515273a..50c9c060 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_server_unexpected.yaml @@ -7,6 +7,31 @@ relevantCompressions: relevantCodecs: - CODEC_PROTO testCases: + - request: + testName: unexpected-content-type + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + rawRequest: + verb: POST + uri: /connectrpc.conformance.v1.ConformanceService/Unary + headers: + - name: content-type + value: [ "image/jpeg" ] + unary: + binary: "12345678" + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED + expectedResponse: + # Ideally, the server would return a 415. But it's not actually specified :/ + # httpStatusCode: 415 + error: + code: CODE_UNKNOWN + - request: testName: unary/no-request streamType: STREAM_TYPE_UNARY diff --git a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml index c28c49cd..5fc0fb83 100644 --- a/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/grpc_web_server_unexpected.yaml @@ -7,6 +7,31 @@ relevantCompressions: relevantCodecs: - CODEC_PROTO testCases: + - request: + testName: unexpected-content-type + streamType: STREAM_TYPE_UNARY + requestMessages: + - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest + rawRequest: + verb: POST + uri: /connectrpc.conformance.v1.ConformanceService/Unary + headers: + - name: content-type + value: [ "image/jpeg" ] + unary: + binary: "12345678" + otherAllowedErrorCodes: + # Not actually specified what error code to use, but only + # internal and unknown really make any sense. There may be + # an argument for unimplemented, too. + - CODE_INTERNAL + - CODE_UNIMPLEMENTED + expectedResponse: + # Ideally, the server would return a 415. But it's not actually specified :/ + # httpStatusCode: 415 + error: + code: CODE_UNKNOWN + - request: testName: unary/no-request streamType: STREAM_TYPE_UNARY diff --git a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml index e9869ce7..ab56931a 100644 --- a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml +++ b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml @@ -5,27 +5,4 @@ relevantCompressions: relevantCodecs: - CODEC_PROTO testCases: - - request: - testName: unexpected-content-type - streamType: STREAM_TYPE_UNARY - requestMessages: - - "@type": type.googleapis.com/connectrpc.conformance.v1.UnaryRequest - rawRequest: - verb: POST - uri: /connectrpc.conformance.v1.ConformanceService/Unary - headers: - - name: content-type - value: [ "image/jpeg" ] - unary: - binary: "12345678" - otherAllowedErrorCodes: - # Not actually specified what error code to use, but only - # internal and unknown really make any sense. There may be - # an argument for unimplemented, too. - - CODE_INTERNAL - - CODE_UNIMPLEMENTED - expectedResponse: - # Ideally, the server would return a 415. But it's not actually specified :/ - # httpStatusCode: 415 - error: - code: CODE_UNKNOWN + diff --git a/testing/referenceclient-known-failing.txt b/testing/referenceclient-known-failing.txt index 7fc77010..06da45f1 100644 --- a/testing/referenceclient-known-failing.txt +++ b/testing/referenceclient-known-failing.txt @@ -1 +1 @@ -# W00T! There are no known failures in the reference client. \ No newline at end of file +# There are no known failures in the reference client. \ No newline at end of file diff --git a/testing/referenceserver-known-failing.txt b/testing/referenceserver-known-failing.txt index 76a9a9f7..3ba96496 100644 --- a/testing/referenceserver-known-failing.txt +++ b/testing/referenceserver-known-failing.txt @@ -1 +1 @@ -# W00T! There are no known failures in the reference server. \ No newline at end of file +# There are no known failures in the reference server. \ No newline at end of file From d5410f9d036a27fb311fefe6762865ea2279e41e Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Thu, 21 Mar 2024 16:17:21 -0400 Subject: [PATCH 10/10] oops, delete no-longer-needed test suite file --- .../testsuites/data/server_unexpected.yaml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 internal/app/connectconformance/testsuites/data/server_unexpected.yaml diff --git a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml b/internal/app/connectconformance/testsuites/data/server_unexpected.yaml deleted file mode 100644 index ab56931a..00000000 --- a/internal/app/connectconformance/testsuites/data/server_unexpected.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: Server Unexpected Requests -mode: TEST_MODE_SERVER -relevantCompressions: - - COMPRESSION_IDENTITY -relevantCodecs: - - CODEC_PROTO -testCases: -