16 lines
543 B
Go
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")
|
|
}
|
|
}
|
|
|