Upload
This commit is contained in:
+22
-22
@@ -1,57 +1,57 @@
|
||||
# Offline Scenarios
|
||||
# Offline-Szenarien
|
||||
|
||||
## Purpose
|
||||
Simulate online/offline behavior in the virtual box and verify status fields.
|
||||
## Zweck
|
||||
Offline/Online-Verhalten in der virtuellen Box pruefen.
|
||||
|
||||
## Prerequisites
|
||||
- Box running on `http://127.0.0.1:8000`
|
||||
## Voraussetzungen
|
||||
- Box laeuft auf `http://127.0.0.1:8000`
|
||||
|
||||
## Step-by-step
|
||||
### WiFi offline (no profiles)
|
||||
## Schritt-fuer-Schritt
|
||||
### WLAN offline (keine Profile)
|
||||
```
|
||||
curl -X POST http://127.0.0.1:8000/command \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"command":"wifi_reset"}'
|
||||
```
|
||||
Expected:
|
||||
Erwartung:
|
||||
- `wifi_state = WIFI_UNCONFIGURED`
|
||||
- `connected_ssid = null`
|
||||
|
||||
### WiFi online
|
||||
### WLAN online
|
||||
```
|
||||
curl -X POST http://127.0.0.1:8000/command \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"command":"wifi_add_profile","payload":{"ssid":"HomeWiFi","password":"secret","priority":10}}'
|
||||
```
|
||||
Expected:
|
||||
Erwartung:
|
||||
- `wifi_state = WIFI_ONLINE`
|
||||
- `connected_ssid = HomeWiFi`
|
||||
|
||||
### Spotify unavailable
|
||||
### Spotify nicht konfiguriert
|
||||
```
|
||||
curl -X POST http://127.0.0.1:8000/command \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"command":"spotify_clear"}'
|
||||
```
|
||||
Expected:
|
||||
Erwartung:
|
||||
- `spotify_status = NOT_CONFIGURED`
|
||||
|
||||
### Spotify ready
|
||||
### Spotify bereit
|
||||
```
|
||||
curl -X POST http://127.0.0.1:8000/command \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"command":"spotify_set_tokens","payload":{"access_token":"a","refresh_token":"b","expires_at":123}}'
|
||||
```
|
||||
Expected:
|
||||
Erwartung:
|
||||
- `spotify_status = READY`
|
||||
|
||||
## Checklist
|
||||
- ✅ WiFi reset shows UNCONFIGURED
|
||||
- ✅ WiFi add profile shows ONLINE
|
||||
- ✅ Spotify clear shows NOT_CONFIGURED
|
||||
- ✅ Spotify set shows READY
|
||||
## Checkliste
|
||||
- ✅ WLAN-Reset zeigt UNCONFIGURED
|
||||
- ✅ WLAN-Profil zeigt ONLINE
|
||||
- ✅ Spotify clear zeigt NOT_CONFIGURED
|
||||
- ✅ Spotify set zeigt READY
|
||||
|
||||
## Troubleshooting
|
||||
- Status not changing:
|
||||
- Ensure `/status` is polled after sending commands.
|
||||
- Check that Box is running and secrets file is writable.
|
||||
- Status aendert sich nicht:
|
||||
- `/status` nach Commands abfragen.
|
||||
- Schreibrechte auf `box/data/secrets.enc` pruefen.
|
||||
|
||||
Reference in New Issue
Block a user