Commit 3dc5aac
committed
test(elixir): add KRaftSupervisor coverage (6 tests, 6 of 9 modules done)
Sixth of nine modules from the test-gap audit gets a dedicated test
file. KRaftSupervisor is small (~47 LOC) but central to consensus
bootstrap; previously had zero direct tests.
Coverage:
- init/1 with empty :nodes returns Supervisor child-spec tuple with
one_for_one strategy and just the Registry child
- One configured node yields Registry + one KRaftNode spec; child id
is {KRaftNode, "node-id"} for uniqueness across multi-node cluster
- Three configured nodes produce 4 children (Registry + 3 KRaftNode),
IDs are unique and contain each configured node_id
- Missing :node_id in node opts raises KeyError as expected (matches
the Keyword.fetch! contract)
Tests use Supervisor.init/2 directly (not start_link) to avoid the
__MODULE__-name collision with any app-managed instance, so this
file is safe to run in any test environment.
Cumulative coverage progress:
✓ DriftMonitor (PR #35) TODO vql_executor (1812 LOC)
✓ EntityServer (PR #35) TODO vql_bridge (738 LOC)
✓ QueryRouter (PR #35) TODO telemetry/collector
✓ SchemaRegistry (PR #37) TODO telemetry/reporter
✓ KRaftSupervisor (this commit)
https://claude.ai/code/session_01GeiWCLLoZmPdnjMMcy2buu1 parent 8b065e8 commit 3dc5aac
1 file changed
Lines changed: 100 additions & 0 deletions
Lines changed: 100 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments