RunServerOnPort will run a server on the given port.
(port int)
| 93 | |
| 94 | // RunServerOnPort will run a server on the given port. |
| 95 | func RunServerOnPort(port int) *server.Server { |
| 96 | opts := natsserver.DefaultTestOptions |
| 97 | opts.Port = port |
| 98 | opts.Cluster.Name = "testing" |
| 99 | return RunServerWithOptions(opts) |
| 100 | } |
| 101 | |
| 102 | // RunServerWithOptions will run a server with the given options. |
| 103 | func RunServerWithOptions(opts server.Options) *server.Server { |
no test coverage detected