Files
CHORUS/pubsub/pubsub_test.go
anthonyrawlins b6634e4c1b refactor CHORUS
2025-09-06 14:47:41 +10:00

16 lines
543 B
Go

package pubsub
import (
"testing"
)
// Note: This is a light test around name routing; full pubsub requires network.
func TestPublishRaw_NameRouting_NoSubscription(t *testing.T) {
// Build a minimal PubSub with names set but no subscriptions.
p := &PubSub{ chorusTopicName: "CHORUS/coordination/v1", hmmmTopicName: "hmmm/meta-discussion/v1", contextTopicName: "CHORUS/context-feedback/v1" }
if err := p.PublishRaw("nonexistent/topic", []byte("{}")); err == nil {
t.Fatalf("expected error for unknown topic")
}
}