Commit d506380
committed
test: add comprehensive device reconnection tests
Add 27 tests covering device operation reconnection state machine:
Reconnection Check Tick (4 tests):
- Increments attempt counter when rebooting
- Increments attempt counter when factory resetting
- Increments attempt counter when updating
- Does not increment when idle
Reconnection Timeout (4 tests):
- Transitions reboot to failed state
- Transitions factory reset to failed with longer timeout
- Transitions update to failed state
- Does nothing when idle
Healthcheck Response - Reboot (3 tests):
- Error marks device offline and transitions to waiting
- Success after offline transitions to successful
- Success without offline keeps checking
Healthcheck Response - Factory Reset (2 tests):
- Error marks device offline
- Success after offline transitions to successful
Healthcheck Response - Update (5 tests):
- Error marks device offline
- Success with Succeeded status after offline completes
- Success with Recovered status after offline completes
- Success with NoUpdate status after offline completes
- Success with incomplete status keeps checking
Healthcheck Response - Waiting Reconnection (4 tests):
- Error updates attempt count
- Success for non-update operation completes
- Success for update with completed status
- Success for update with incomplete status keeps waiting
Healthcheck Response - Network Change (2 tests):
- Successful healthcheck transitions to reachable
- Failed healthcheck keeps waiting
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>1 parent 3aefee4 commit d506380
1 file changed
+636
-0
lines changed
0 commit comments