wifi: add WPA2 AP setup API and pairing roadmap
This commit is contained in:
@@ -304,3 +304,28 @@ def test_embedded_webui_uses_partial_status_for_overview_polling():
|
||||
assert 'fetch(statusUrl(),{cache:"no-store"})' in source
|
||||
assert 'function mergeStatus(previous,next)' in source
|
||||
assert 'api("/status?fields=config")' in source
|
||||
|
||||
|
||||
def test_cargo_ap_uses_wpa2_password():
|
||||
source = firmware_source()
|
||||
|
||||
assert "Preferences apPrefs;" in source
|
||||
assert "generateDefaultApPassword" in source
|
||||
assert "validApPassword" in source
|
||||
assert "loadApConfig();" in source
|
||||
assert "startAccessPoint()" in source
|
||||
assert "WiFi.softAP(apSsid.c_str(), apPassword.c_str())" in source
|
||||
assert 'network["ap_auth"] = "wpa2";' in source
|
||||
assert 'server.on(API_V1("/config/ap"), HTTP_GET, handleGetApConfig);' in source
|
||||
assert 'server.on(API_V1("/config/ap"), HTTP_POST, handleUpdateApConfig);' in source
|
||||
|
||||
|
||||
def test_cargo_ap_password_is_not_returned_by_get_config_ap():
|
||||
source = firmware_source()
|
||||
|
||||
get_start = source.index("void handleGetApConfig()")
|
||||
get_end = source.index("void handleUpdateApConfig()")
|
||||
get_body = source[get_start:get_end]
|
||||
|
||||
assert 'response["password_set"]' in get_body
|
||||
assert 'response["password"]' not in get_body
|
||||
|
||||
Reference in New Issue
Block a user