test(ha-config-bootstrap): RED phase tests for config bootstrap (task 5.1)
- 9 Unity tests covering Req 3.1-3.5: immediate return on nonzero tag, all-zero peers no defer, peer tag>0 sets defer_config_fetch, probe error codes, deferred fetch preconditions, ha_init zero invariant - Linker fails with undefined refs to bootstrap_config_if_needed and xce_probe_config_tag (expected RED proof)
This commit is contained in:
parent
0c9c720b03
commit
3cf82721d6
4 changed files with 481 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ Dependency order: startup validation (D) unblocks vtaskmgr before election (A);
|
|||
- _Boundary: Controller FSM (ha.c, myapp.c)_
|
||||
|
||||
- [ ] 5. Change C: Config bootstrap for unconfigured nodes
|
||||
- [ ] 5.1 Write failing tests for config bootstrap
|
||||
- [x] 5.1 Write failing tests for config bootstrap
|
||||
- In `src/controller/testsuite/test_ha_bootstrap.c`: test `config_tag != 0` → returns immediately; test all-zero peers → proceed to election; test any peer has `tag > 0` → `defer_config_fetch = true`; test no peer reachable → retries with exponential backoff (mock clock); test deferred fetch called when election winner known and `defer_config_fetch` is set; test `xce_probe_config_tag()` returns 0 on success, `-ECONNREFUSED` on unreachable
|
||||
- `make test` fails
|
||||
- _Requirements: 3.1, 3.2, 3.3, 3.4, 3.5_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue