summaryrefslogtreecommitdiff
path: root/ext/websocket
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2023-04-26 17:48:23 +0200
committerGitHub <noreply@github.com>2023-04-26 15:48:23 +0000
commit17d1c7e444542f43229a047853605ac22081abdf (patch)
treeb76a085f46b0751f5808f311d532c99aa11dedad /ext/websocket
parent38681dfa88defd1f9f3abd74cbb6c83cff597d84 (diff)
Revert "chore(ext/websocket): Add autobahn|testsuite fuzzingclient (#… (#18856)
…18846)" This reverts commit 036778c2e8e159ef1e586de4102f823367b7c554. Keeps failing on `main` branch.
Diffstat (limited to 'ext/websocket')
-rw-r--r--ext/websocket/autobahn/autobahn_server.js20
-rw-r--r--ext/websocket/autobahn/fuzzingclient.js33
-rw-r--r--ext/websocket/autobahn/fuzzingclient.json26
3 files changed, 0 insertions, 79 deletions
diff --git a/ext/websocket/autobahn/autobahn_server.js b/ext/websocket/autobahn/autobahn_server.js
deleted file mode 100644
index c678dfc1a..000000000
--- a/ext/websocket/autobahn/autobahn_server.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-import { parse } from "../../../test_util/std/flags/mod.ts";
-
-const { port } = parse(Deno.args, {
- number: ["port"],
- default: {
- port: 6969,
- },
-});
-
-const { serve } = Deno;
-
-// A message-based WebSocket echo server.
-serve((request) => {
- const { socket, response } = Deno.upgradeWebSocket(request);
- socket.onmessage = (event) => {
- socket.send(event.data);
- };
- return response;
-}, { port });
diff --git a/ext/websocket/autobahn/fuzzingclient.js b/ext/websocket/autobahn/fuzzingclient.js
deleted file mode 100644
index 8aa716695..000000000
--- a/ext/websocket/autobahn/fuzzingclient.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-// deno-lint-ignore-file
-
-import { $ } from "https://deno.land/x/dax@0.31.0/mod.ts";
-
-const pwd = new URL(".", import.meta.url).pathname;
-
-const AUTOBAHN_TESTSUITE_DOCKER =
- "crossbario/autobahn-testsuite:0.8.2@sha256:5d4ba3aa7d6ab2fdbf6606f3f4ecbe4b66f205ce1cbc176d6cdf650157e52242";
-
-const self = Deno.execPath();
-$`${self} run -A --unstable ${pwd}/autobahn_server.js`.spawn();
-await $`docker run --name fuzzingserver -v ${pwd}/fuzzingclient.json:/fuzzingclient.json:ro -v ${pwd}/reports:/reports -p 9001:9001 --net=host --rm ${AUTOBAHN_TESTSUITE_DOCKER} wstest -m fuzzingclient -s fuzzingclient.json`
- .cwd(pwd);
-
-const { deno_websocket } = JSON.parse(
- Deno.readTextFileSync(`${pwd}/reports/servers/index.json`),
-);
-const result = Object.values(deno_websocket);
-
-function failed(name) {
- return name != "OK" && name != "INFORMATIONAL" && name != "NON-STRICT";
-}
-
-const failedtests = result.filter((outcome) => failed(outcome.behavior));
-
-console.log(
- `%c${result.length - failedtests.length} / ${result.length} tests OK`,
- `color: ${failedtests.length == 0 ? "green" : "red"}`,
-);
-
-Deno.exit(failedtests.length == 0 ? 0 : 1);
diff --git a/ext/websocket/autobahn/fuzzingclient.json b/ext/websocket/autobahn/fuzzingclient.json
deleted file mode 100644
index fcee80c99..000000000
--- a/ext/websocket/autobahn/fuzzingclient.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "outdir": "./reports/servers",
- "servers": [
- {
- "agent": "deno_websocket",
- "url": "ws://localhost:6969"
- }
- ],
- "cases": [
- "1.*",
- "2.*",
- "3.*",
- "4.*",
- "5.*",
- "6.*",
- "7.*",
- "9.*",
- "10.*"
- ],
- "exclude-cases": [
- "11.*",
- "12.*",
- "13.*"
- ],
- "exclude-agent-cases": {}
-}