layer1: stabilize namespace summary contract
This commit is contained in:
@@ -582,6 +582,23 @@ func TestLogNamespaceManagerSummary(t *testing.T) {
|
||||
|
||||
LogNamespaceManagerSummary(logger, "namespace summary", summary)
|
||||
}
|
||||
|
||||
func TestNamespaceManagerSummaryEmptyContract(t *testing.T) {
|
||||
manager := NewNamespaceManager()
|
||||
summary := manager.Summary()
|
||||
if summary.PhaseCounts == nil {
|
||||
t.Fatalf("expected phase counts map to be initialized")
|
||||
}
|
||||
if summary.SourceCounts == nil {
|
||||
t.Fatalf("expected source counts map to be initialized")
|
||||
}
|
||||
if summary.Subscribers == nil {
|
||||
t.Fatalf("expected subscribers slice to be initialized")
|
||||
}
|
||||
if len(summary.Subscribers) != 0 {
|
||||
t.Fatalf("expected no subscribers in empty summary")
|
||||
}
|
||||
}
|
||||
func TestLogNamespaceManagerSummaryWithNilLogger(t *testing.T) {
|
||||
LogNamespaceManagerSummary(nil, "ignored", NamespaceManagerSummary{TotalNamespaces: 1})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user