conductor(checkpoint): Checkpoint end of Phase 3 - UI and Health Logic

This commit is contained in:
2026-02-09 06:14:47 -08:00
parent c5a3cbfeb8
commit 21e9c3d72d
2 changed files with 29 additions and 2 deletions

View File

@@ -54,8 +54,25 @@ def test_format_diagnostics_empty():
"node": "node1",
"status": "passing",
"litefs_error": None
},
{
"node": "node2",
"status": "standby", # Should also be empty
"litefs_error": None
}
]
diagnostics = output_formatter.format_diagnostics(nodes, use_color=False)
assert diagnostics == ""
def test_format_node_table_status_colors():
"""Test that different statuses are handled."""
nodes = [
{"node": "n1", "role": "primary", "status": "passing", "litefs_primary": True},
{"node": "n2", "role": "replica", "status": "standby", "litefs_primary": False},
{"node": "n3", "role": "primary", "status": "unregistered", "litefs_primary": True},
]
table = output_formatter.format_node_table(nodes, use_color=False)
assert "passing" in table
assert "standby" in table
assert "unregistered" in table