Test websocket with default values for options.
(node_factory)
| 326 | |
| 327 | |
| 328 | def test_websocket_wrong_rune(node_factory): |
| 329 | """Test websocket with default values for options.""" |
| 330 | # start a node with clnrest |
| 331 | l1, base_url, ca_cert = start_node_with_clnrest(node_factory) |
| 332 | |
| 333 | # http session |
| 334 | http_session = http_session_with_retry() |
| 335 | http_session.verify = ca_cert.as_posix() |
| 336 | |
| 337 | # wrong rune provided => no websocket connection and no notification received |
| 338 | http_session.headers.update({"rune": "jMHrjVJb5l9-mjEd7zwux7Ookra1fgZ8wa9D8QbVT-w9MA=="}) |
| 339 | |
| 340 | notifications = notifications_received_via_websocket(l1, base_url, http_session, expect_error="Not derived from master") |
| 341 | l1.daemon.logsearch_start = 0 |
| 342 | assert l1.daemon.wait_for_log(r"Error code 1501: Not authorized: Not derived from master") |
| 343 | assert len(notifications) == 0 |
| 344 | |
| 345 | |
| 346 | def test_websocket_unrestricted_rune(node_factory): |
nothing calls this directly
no test coverage detected