mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
btest/cluster/telemetry: Add smoke testing for telemetry
This commit is contained in:
parent
b28e5f261e
commit
0e1431eef4
10 changed files with 347 additions and 2 deletions
|
@ -90,14 +90,18 @@ class TestClient:
|
|||
return self.__name
|
||||
|
||||
|
||||
def connect(name: str, url: Optional[str] = None) -> TestClient:
|
||||
def connect(
|
||||
name: str,
|
||||
url: Optional[str] = None,
|
||||
additional_headers: Optional[dict[str, str]] = None,
|
||||
) -> TestClient:
|
||||
"""
|
||||
Connect to a WebSocket server and return a TestClient instance.
|
||||
"""
|
||||
if url is None:
|
||||
url = WS4_URL_V1
|
||||
|
||||
cc = websockets.sync.client.connect(url)
|
||||
cc = websockets.sync.client.connect(url, additional_headers=additional_headers)
|
||||
return TestClient(name, cc)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue