feat(gl): add standalone ledger authority mode
CI/CD Stage / stage (push) Failing after 1m12s

This commit is contained in:
2026-10-06 22:40:07 +03:30
parent 01d13dbbf2
commit 88e227f80c
26 changed files with 2033 additions and 196 deletions
+12
View File
@@ -61,3 +61,15 @@ func TestCheckReportsSettlementQueryFailure(t *testing.T) {
t.Fatalf("unexpected status: %+v", got)
}
}
type pausedSettlementStub struct{ settlementStub }
func (pausedSettlementStub) SettlementAllowed(context.Context) (bool, error) { return false, nil }
func TestGLOnlyKeepsLedgerServingWhileNormalSettlementClientsFailClosed(t *testing.T) {
monitor := pausedSettlementStub{settlementStub{stats: ledger.SettlementStats{Pending: 3}}}
got := NewService(databaseStub{}, monitor).Check(context.Background())
if !got.Serving || !got.DatabaseReady || !got.SettlementEnabled || got.SettlementReady || got.SettlementStats.Pending != 3 {
t.Fatalf("unexpected GL-only readiness: %+v", got)
}
}