test(ha-config-bootstrap): add failing startup validation tests (task 2.1)

RED-phase tests for 4 startup validation functions — all fail at link time
because the functions under test do not exist yet:
- validate_peer_count: even N>1 returns -EINVAL, odd N returns 0
- validate_cert_files: missing cert/key returns -ENOENT with full path
  in err_buf output param (asserted via strstr)
- validate_vcpus: vcpus<=0 returns -EINVAL, positive returns 0
- validate_startup_config: vcpus key in config returns 0 (not fatal)
  and writes deprecation text into warn_buf (asserted via strstr)
This commit is contained in:
Rongsong Shen 2026-05-28 03:31:30 +00:00
parent 560d8fa1c8
commit bfa41eb135
4 changed files with 248 additions and 1 deletions

View file

@ -100,6 +100,7 @@ controller_unit_test_src = [
'testsuite/test_ctrl_metrics.c',
'testsuite/test_config_repl.c',
'testsuite/test_worker_join.c',
'testsuite/test_ha_startup.c',
'worker.c',
'persist.c',
'ha.c',