package mcp import ( "testing" "time" ) func TestNew(t *testing.T) { cfg := ServerConfig{ NATSUrl: "nats://localhost:4222", NKeyFile: "/path/to/key", EnableAdmin: false, AdminNKeyFile: "", DiscoverSubject: "deploy.discover", Timeout: 10 * time.Minute, } s := New(cfg) if s == nil { t.Fatal("New() returned nil") } if s.server == nil { t.Error("server should not be nil") } } func TestNew_WithAdmin(t *testing.T) { cfg := ServerConfig{ NATSUrl: "nats://localhost:4222", NKeyFile: "/path/to/key", EnableAdmin: true, AdminNKeyFile: "/path/to/admin/key", DiscoverSubject: "deploy.discover", Timeout: 10 * time.Minute, } s := New(cfg) if s == nil { t.Fatal("New() returned nil") } }