diff options
author | Loïc Hoguin <[email protected]> | 2025-01-15 13:12:27 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2025-01-15 13:31:19 +0100 |
commit | 818b448ae9eab17aadc8ea2bacaa82948a2e9b56 (patch) | |
tree | 6c0a2c923e24435584aadb63ae8bcdac038ce292 | |
parent | 1724575b4222465ed71f3103b83db549a8036e16 (diff) | |
download | cowboy-818b448ae9eab17aadc8ea2bacaa82948a2e9b56.tar.gz cowboy-818b448ae9eab17aadc8ea2bacaa82948a2e9b56.tar.bz2 cowboy-818b448ae9eab17aadc8ea2bacaa82948a2e9b56.zip |
Switch to running autobahntestsuite via Docker
-rw-r--r-- | test/ws_autobahn_SUITE.erl | 12 | ||||
-rw-r--r-- | test/ws_autobahn_SUITE_data/client.json | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/test/ws_autobahn_SUITE.erl b/test/ws_autobahn_SUITE.erl index 71e5c81..0e12300 100644 --- a/test/ws_autobahn_SUITE.erl +++ b/test/ws_autobahn_SUITE.erl @@ -51,7 +51,7 @@ end_per_group(Listener, _Config) -> init_dispatch() -> cowboy_router:compile([ - {"localhost", [ + {"host.docker.internal", [ {"/ws_echo", ws_echo, []} ]} ]). @@ -73,7 +73,15 @@ autobahn_fuzzingclient(Config) -> end. do_start_port(Config, Pid) -> - Port = open_port({spawn, "wstest -m fuzzingclient -s " ++ config(data_dir, Config) ++ "client.json"}, +% Cmd = "wstest -m fuzzingclient -s " ++ config(data_dir, Config) ++ "client.json", + Cmd = "sudo docker run --rm " + "-v " ++ config(data_dir, Config) ++ "/client.json:/client.json " + "-v " ++ config(priv_dir, Config) ++ "/reports:/reports " + "--add-host=host.docker.internal:host-gateway " + "--name fuzzingclient " + "crossbario/autobahn-testsuite " + "wstest -m fuzzingclient -s client.json", + Port = open_port({spawn, Cmd}, [{line, 10000}, {cd, config(priv_dir, Config)}, binary, eof]), do_receive_infinity(Port, Pid). diff --git a/test/ws_autobahn_SUITE_data/client.json b/test/ws_autobahn_SUITE_data/client.json index 7899503..c729193 100644 --- a/test/ws_autobahn_SUITE_data/client.json +++ b/test/ws_autobahn_SUITE_data/client.json @@ -4,7 +4,7 @@ "servers": [{ "agent": "Cowboy", - "url": "ws://localhost:33080/ws_echo", + "url": "ws://host.docker.internal:33080/ws_echo", "options": {"version": 18} }], |