summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-02-14 14:15:24 -0500
committerMark Felder <feld@feld.me>2024-02-14 15:27:12 -0500
commitd0f4b2b02fc3aee3f08239d9c188ca5a2e8ad482 (patch)
tree208dd785635a28414e97181b742ba9c5c8a095e8 /test
parent64ad451a7b8a2ac89079a1bc32680e9cf08ef24e (diff)
Remove invalid test
It is not allowed to use the Sec-WebSocket-Protocol header for arbitrary values. This was possible due to the raw websocket handling we were doing with Cowboy, but Phoenix.Socket.Transport does not allow this as the value of this header is compared against a static list of subprotocols. https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#socket/3-websocket-configuration Additionally I cannot find anywhere that we depended on this behavior. Setting the Sec-WebSocket-Protocol header does not appear to be a part of PleromaFE.
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/integration/mastodon_websocket_test.exs11
1 files changed, 0 insertions, 11 deletions
diff --git a/test/pleroma/integration/mastodon_websocket_test.exs b/test/pleroma/integration/mastodon_websocket_test.exs
index a2c20f0a6..a0ffddf8d 100644
--- a/test/pleroma/integration/mastodon_websocket_test.exs
+++ b/test/pleroma/integration/mastodon_websocket_test.exs
@@ -268,17 +268,6 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do
end)
end
- test "accepts valid token on Sec-WebSocket-Protocol header", %{token: token} do
- assert {:ok, _} = start_socket("?stream=user", [{"Sec-WebSocket-Protocol", token.token}])
-
- capture_log(fn ->
- assert {:error, %WebSockex.RequestError{code: 401}} =
- start_socket("?stream=user", [{"Sec-WebSocket-Protocol", "I am a friend"}])
-
- Process.sleep(30)
- end)
- end
-
test "accepts valid token on client-sent event", %{token: token} do
assert {:ok, pid} = start_socket()