mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 22:02:17 +01:00
test: prove no read item can outgrow the snapshot unit
The read routes leave out a room, shade, group or linked shade that doesn't fit the 3 KB unit, without telling the client (KNOWN_ISSUES.md). test_snapshot_limits fills a snapshot with the largest possible items and checks every read document written with the real unit is identical to the same document written with an unlimited one. The largest item, a shade, is 1,097 bytes. The unit is now SNAPSHOT_UNIT_SIZE in ModelSnapshot.h, used by Web.cpp and the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
29211630f2
commit
89d3713d86
5 changed files with 153 additions and 6 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include "ModelSnapshot.h"
|
||||
|
||||
static model_snapshot_t snap;
|
||||
static char unitBuf[3072];
|
||||
static char unitBuf[SNAPSHOT_UNIT_SIZE];
|
||||
|
||||
static room_snapshot_t room(uint8_t id, const char *name) {
|
||||
room_snapshot_t r{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue