layer1: add namespace source counts

This commit is contained in:
Naeel
2026-04-26 10:59:01 +03:00
parent f16aa030db
commit b93e720e12
4 changed files with 27 additions and 0 deletions
+6
View File
@@ -63,6 +63,9 @@ func TestNamespaceManagerSnapshotAndGet(t *testing.T) {
if summary.TotalNamespaces != 2 {
t.Fatalf("expected summary total namespaces to be 2, got %d", summary.TotalNamespaces)
}
if summary.SourceCounts[NamespaceSourceWatcher] != 2 {
t.Fatalf("expected watcher source count to be 2")
}
}
func TestNamespaceManagerUpsertIncrementsGeneration(t *testing.T) {
@@ -473,6 +476,9 @@ func TestNamespaceManagerSummary(t *testing.T) {
if !reflect.DeepEqual([]string{"router"}, summary.Subscribers) {
t.Fatalf("expected router subscriber in summary")
}
if summary.SourceCounts[NamespaceSourceWatcher] != 2 {
t.Fatalf("expected two watcher-sourced namespaces")
}
}
func TestLogNamespaceManagerSummaryWithNilLogger(t *testing.T) {