mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
tests: reset option relay.network.websocket_allowed_origins after changing it in tests (issue #2127)
This fixes a test failure when the test changing the option is executed before
this one:
…/tests/unit/plugins/relay/api/test-relay-api-protocol.cpp:799: error: Failure in TEST(RelayApiProtocolWithClient, RecvJson)
expected <HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: Z5uTZwvwYNDm9w4HFGk26ijp/p0=
>
but was <HTTP/1.1 403 Forbidden
Content-Length: 0
>
difference starts at position 9 at: < HTTP/1.1 403 Forbid>
This commit is contained in:
@@ -165,6 +165,7 @@ TEST(RelayWebsocket, ClientHandshakeValid)
|
||||
LONGS_EQUAL(-2, relay_websocket_client_handshake_valid (request));
|
||||
hashtable_set (request->headers, "origin", "example.com");
|
||||
LONGS_EQUAL(0, relay_websocket_client_handshake_valid (request));
|
||||
config_file_option_reset (relay_config_network_websocket_allowed_origins, 1);
|
||||
|
||||
relay_websocket_deflate_reinit (request->ws_deflate);
|
||||
relay_websocket_parse_extensions ("permessage-deflate", request->ws_deflate, 1);
|
||||
|
||||
Reference in New Issue
Block a user