Skip to content

Commit 4d199f6

Browse files
authored
Enable protobuf conformance tests (#39)
1 parent 909a0d7 commit 4d199f6

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,26 @@ RUN sbt stage
2727
FROM sbtscala/scala-sbt:eclipse-temurin-23.0.1_11_1.10.5_3.3.4 AS runner
2828

2929
COPY --from=conformance /conformance /conformance
30-
ADD conformance-suite.yaml /conformance/conformance-suite.yaml
30+
ADD conformance-suite.yaml /conformance/
31+
ADD conformance-suite-stable.yaml /conformance/
3132
COPY --from=build /app/conformance/target/universal/stage /app
3233
WORKDIR /conformance
3334

3435
RUN mkdir "/logs"
36+
37+
# Run stable tests first
38+
RUN echo ">>>>> Running stable tests <<<<<"
39+
RUN LOGS_PATH="/logs" \
40+
./connectconformance \
41+
--conf conformance-suite-stable.yaml \
42+
--mode server \
43+
--parallel 1 \
44+
-v -vv --trace \
45+
-- \
46+
/app/bin/conformance
47+
48+
# Run unstable tests; allow them to fail
49+
RUN echo ">>>>> Running unstable tests <<<<<"
3550
RUN LOGS_PATH="/logs" \
3651
./connectconformance \
3752
--conf conformance-suite.yaml \

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This simplifies overall setup: simpler CI, fewer network components, faster exec
6161
```yaml
6262
versions: [ HTTP_VERSION_1 ]
6363
protocols: [ PROTOCOL_CONNECT ]
64-
codecs: [ CODEC_JSON ]
64+
codecs: [ CODEC_JSON, CODEC_PROTO ]
6565
stream_types: [ STREAM_TYPE_UNARY ]
6666
supports_tls: false
6767
supports_trailers: false
@@ -152,6 +152,8 @@ Diagnostic data from the server itself is written to the log file `out/out.log`.
152152

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

155+
⌛ Protobuf codec conformance status: __13/72__ tests pass.
156+
155157
Known issues:
156158

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

161163
- [x] Support GET-requests
162164
- [ ] Support `google.api.http` annotations (GRPC transcoding)
165+
- [ ] Support configurable timeouts
163166
- [ ] Support non-unary (streaming) methods

conformance-suite-stable.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://github.com/connectrpc/conformance/blob/main/docs/configuring_and_running_tests.md#configuration-files
2+
features:
3+
versions: [ HTTP_VERSION_1 ]
4+
protocols: [ PROTOCOL_CONNECT ]
5+
codecs: [ CODEC_JSON ]
6+
stream_types: [ STREAM_TYPE_UNARY ]
7+
supports_tls: false
8+
supports_trailers: false
9+
supports_connect_get: true
10+
supports_message_receive_limit: false

conformance-suite.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
features:
33
versions: [ HTTP_VERSION_1 ]
44
protocols: [ PROTOCOL_CONNECT ]
5-
codecs: [ CODEC_JSON ] #, CODEC_PROTO ]
5+
codecs: [ CODEC_PROTO ]
66
stream_types: [ STREAM_TYPE_UNARY ]
77
supports_tls: false
88
supports_trailers: false

0 commit comments

Comments
 (0)