fix: valid WireGuard interface candidate name (tests/test_app.py)
This commit is contained in:
parent
a9f6c86c7c
commit
b0fd3c1e36
1 changed files with 12 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ def test_health_exposes_current_version():
|
|||
with TestClient(app.app) as client:
|
||||
response = client.get("/health")
|
||||
assert response.status_code == 200
|
||||
assert response.json()["version"] == app.VERSION == "2.3.8"
|
||||
assert response.json()["version"] == app.VERSION == "2.3.9"
|
||||
|
||||
|
||||
def test_media_handoff_proxies_strict_category_contract(monkeypatch):
|
||||
|
|
@ -1344,3 +1344,14 @@ def test_sascha_media_tunnel_apply_returns_redacted_result(monkeypatch):
|
|||
assert response.status_code == 200
|
||||
assert response.json()["handshake"] is True
|
||||
assert "private" not in response.text.lower()
|
||||
|
||||
|
||||
def test_sascha_media_tunnel_candidate_uses_valid_wireguard_interface_name():
|
||||
import base64
|
||||
import re
|
||||
|
||||
command = app._media_tunnel_install_command("vps", "A" * 43 + "=")
|
||||
encoded = re.search(r"b64decode\('([^']+)'\)", command).group(1)
|
||||
script = base64.b64decode(encoded).decode()
|
||||
assert 'root / "wgmtest.conf"' in script
|
||||
assert len("wgmtest") <= 15
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue