test: containerize portal hardware contract

This commit is contained in:
2026-09-06 20:32:46 +10:00
parent d57f6c91c5
commit daf9f207b2
20 changed files with 758 additions and 181 deletions
+8 -5
View File
@@ -4,13 +4,15 @@
namespace {
#if defined(ESP8266)
constexpr char kPortalSsid[] = "WM Browser ESP8266";
constexpr char kPortalSsid[] = "WM Contract ESP8266";
#else
constexpr char kPortalSsid[] = "WM Browser ESP32";
constexpr char kPortalSsid[] = "WM Contract ESP32";
#endif
constexpr char kPortalPassword[] = "default1";
WiFiManager wifi;
WiFiManagerParameter kInstallationLabel(
"installation_label", "Installation label", "Contract fixture", 32);
} // namespace
@@ -18,13 +20,14 @@ void setup() {
Serial.begin(115200);
delay(300);
// This harness is deliberately portal-only: it has no saved station
// credentials and never exercises a consuming application.
wifi.setConfigPortalTimeout(0);
// The fixture intentionally has no station credentials. A finite window
// exercises timeout reset without leaving a board in a permanent portal.
wifi.setConfigPortalTimeout(15 * 60);
wifi.setAPStaticIPConfig(
IPAddress(192, 168, 4, 1),
IPAddress(192, 168, 4, 1),
IPAddress(255, 255, 255, 0));
wifi.portalAddParameter(&kInstallationLabel);
wifi.startConfigPortal(kPortalSsid, kPortalPassword);
}
+4
View File
@@ -0,0 +1,4 @@
# Ignored local credentials for the optional station handoff test.
# These values are mounted read-only into the Docker test container.
WIFI_SSID=replace-me
WIFI_PASSWORD=replace-me