Skip to content

Commit

Permalink
Enable protobuf conformance tests (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-vovk authored Dec 7, 2024
1 parent 909a0d7 commit 4d199f6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,26 @@ RUN sbt stage
FROM sbtscala/scala-sbt:eclipse-temurin-23.0.1_11_1.10.5_3.3.4 AS runner

COPY --from=conformance /conformance /conformance
ADD conformance-suite.yaml /conformance/conformance-suite.yaml
ADD conformance-suite.yaml /conformance/
ADD conformance-suite-stable.yaml /conformance/
COPY --from=build /app/conformance/target/universal/stage /app
WORKDIR /conformance

RUN mkdir "/logs"

# Run stable tests first
RUN echo ">>>>> Running stable tests <<<<<"
RUN LOGS_PATH="/logs" \
./connectconformance \
--conf conformance-suite-stable.yaml \
--mode server \
--parallel 1 \
-v -vv --trace \
-- \
/app/bin/conformance

# Run unstable tests; allow them to fail
RUN echo ">>>>> Running unstable tests <<<<<"
RUN LOGS_PATH="/logs" \
./connectconformance \
--conf conformance-suite.yaml \
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This simplifies overall setup: simpler CI, fewer network components, faster exec
```yaml
versions: [ HTTP_VERSION_1 ]
protocols: [ PROTOCOL_CONNECT ]
codecs: [ CODEC_JSON ]
codecs: [ CODEC_JSON, CODEC_PROTO ]
stream_types: [ STREAM_TYPE_UNARY ]
supports_tls: false
supports_trailers: false
Expand Down Expand Up @@ -152,6 +152,8 @@ Diagnostic data from the server itself is written to the log file `out/out.log`.

✅ JSON codec conformance status: __79/79__ tests pass.

⌛ Protobuf codec conformance status: __13/72__ tests pass.

Known issues:

~~* Response headers are ignored in case of an error from the server~~
Expand All @@ -160,4 +162,5 @@ Known issues:

- [x] Support GET-requests
- [ ] Support `google.api.http` annotations (GRPC transcoding)
- [ ] Support configurable timeouts
- [ ] Support non-unary (streaming) methods
10 changes: 10 additions & 0 deletions conformance-suite-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://github.com/connectrpc/conformance/blob/main/docs/configuring_and_running_tests.md#configuration-files
features:
versions: [ HTTP_VERSION_1 ]
protocols: [ PROTOCOL_CONNECT ]
codecs: [ CODEC_JSON ]
stream_types: [ STREAM_TYPE_UNARY ]
supports_tls: false
supports_trailers: false
supports_connect_get: true
supports_message_receive_limit: false
2 changes: 1 addition & 1 deletion conformance-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
features:
versions: [ HTTP_VERSION_1 ]
protocols: [ PROTOCOL_CONNECT ]
codecs: [ CODEC_JSON ] #, CODEC_PROTO ]
codecs: [ CODEC_PROTO ]
stream_types: [ STREAM_TYPE_UNARY ]
supports_tls: false
supports_trailers: false
Expand Down

0 comments on commit 4d199f6

Please sign in to comment.