mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-21 10:12:37 +10:00
test: containerize portal hardware contract
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user