Skip to content

Commit

Permalink
Tweak error codes according to the conformance suite (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikrsna-buf authored Apr 22, 2024
1 parent fd9a931 commit b086085
Show file tree
Hide file tree
Showing 42 changed files with 801 additions and 423 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ testnodeconformance: $(BIN)/node16 $(BIN)/node18 $(BIN)/node20 $(BIN)/node21 $(B

.PHONY: testwebconformance
testwebconformance: $(BUILD)/connect-conformance
npm run -w packages/connect-conformance test:web -- --browser chrome --headless
npm run -w packages/connect-conformance test:web -- --browser firefox --headless
npm run -w packages/connect-conformance test:web -- --browser node
npm run -w packages/connect-conformance test:web:chrome
npm run -w packages/connect-conformance test:web:firefox
npm run -w packages/connect-conformance test:web:node
@# Requires one to enable the 'Allow Remote Automation' option in Safari's Develop menu.
ifeq ($(NODE_OS),darwin)
npm run -w packages/connect-conformance test:web -- --browser safari --headless
npm run -w packages/connect-conformance test:web:safari
endif

.PHONY: testwebconformancelocal
Expand Down
33 changes: 2 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/connect-conformance/conformance-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ features:
supportsTlsClientCerts: true
supportsConnectGet: true
supportsHalfDuplexBidiOverHttp1: false
requiresConnectVersionHeader: false
supportsMessageReceiveLimit: true
supportsMessageReceiveLimit: false
19 changes: 19 additions & 0 deletions packages/connect-conformance/conformance-web-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
features:
versions:
- HTTP_VERSION_1
protocols:
- PROTOCOL_CONNECT
- PROTOCOL_GRPC_WEB
codecs:
- CODEC_PROTO
- CODEC_JSON
compressions:
- COMPRESSION_IDENTITY
streamTypes:
- STREAM_TYPE_UNARY
- STREAM_TYPE_SERVER_STREAM
supportsTls: false
supportsH2c: false
supportsConnectGet: true
supportsHalfDuplexBidiOverHttp1: false
supportsMessageReceiveLimit: false
2 changes: 1 addition & 1 deletion packages/connect-conformance/conformance-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ features:
supportsTlsClientCerts: false
supportsConnectGet: true
supportsHalfDuplexBidiOverHttp1: false
requiresConnectVersionHeader: false
supportsMessageReceiveLimit: false
8 changes: 5 additions & 3 deletions packages/connect-conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
"connectconformance": "bin/connectconformance"
},
"scripts": {
"generate": "buf generate buf.build/connectrpc/conformance:v1.0.0-rc2",
"generate": "buf generate buf.build/connectrpc/conformance:v1.0.2",
"clean": "rm -rf ./dist/cjs/*",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs",
"build:esm": "tsc --project tsconfig.json --module ES2015 --outDir ./dist/esm",
"test:web:chrome": "./bin/connectconformance --mode client --conf conformance-web.yaml -v -- ./bin/conformancewebclient --browser chrome --headless",
"test:web:firefox": "./bin/connectconformance --mode client --conf conformance-web.yaml -v --known-failing '**/server-stream/cancel-after-zero-responses' --known-failing '**/server-stream/cancel-after-responses' -- ./bin/conformancewebclient --browser firefox --headless",
"test:web:safari": "./bin/connectconformance --mode client --conf conformance-web.yaml -v -- ./bin/conformancewebclient --browser safari --headless",
"test:web:node": "./bin/connectconformance --mode client --conf conformance-web-node.yaml -v -- ./bin/conformancewebclient --browser node",
"test:web": "./bin/connectconformance --mode client --conf conformance-web.yaml -v -- ./bin/conformancewebclient",
"test:node:server": "./bin/connectconformance --mode server --conf conformance-node.yaml -v ./bin/conformancenodeserver",
"test:node:client": "./bin/connectconformance --mode client --conf conformance-node.yaml -v ./bin/conformancenodeclient",
Expand All @@ -23,8 +27,6 @@
"@bufbuild/protobuf": "^1.7.2",
"@connectrpc/connect": "1.4.0",
"@connectrpc/connect-node": "1.4.0",
"node-forge": "^1.3.1",
"asn1js": "^3.0.5",
"fflate": "^0.8.1",
"tar-stream": "^3.1.7",
"undici": "^5.28.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-conformance/src/conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { Readable } from "node:stream";
import { execFileSync } from "node:child_process";
import { fetch } from "undici";

const version = "v1.0.0-rc1";
const version = "v1.0.2";
const name = "connectconformance";
const downloadUrl = `https://github.com/connectrpc/conformance/releases/download/${version}`;

Expand Down
Loading

0 comments on commit b086085

Please sign in to comment.