Documentation ¶
Overview ¶
Package test has test functions for the surveyor
Index ¶
- Variables
- func ConnectAndVerify(t *testing.T, url string, options ...nats.Option) *nats.Conn
- func NewJetStreamServer(t *testing.T) *server.Server
- func NewServerFromConfig(t *testing.T, configFile string) *server.Server
- func NewSingleServer(t *testing.T) *server.Server
- func StartBasicServer() *server.Server
- func StartJetStreamServerFromConfig(t *testing.T, confFile string) *server.Server
- func StartServer(t *testing.T, confFile string) *server.Server
- type SuperCluster
Constants ¶
This section is empty.
Variables ¶
var (
SystemCreds = "../test/SYS.creds"
)
Test variables
Functions ¶
func ConnectAndVerify ¶
ConnectAndVerify connects to a server a verifies it is ready to process messages.
func NewJetStreamServer ¶ added in v0.2.2
NewJetStreamServer creates a single NATS server with JetStream enabled globally
func NewServerFromConfig ¶ added in v0.5.1
NewServerFromConfig creates a single NATS server using provided config file
func NewSingleServer ¶
NewSingleServer creates a single NATS server with a system account
func StartBasicServer ¶
StartBasicServer runs the NATS server with a monitor port in a go routine
func StartJetStreamServerFromConfig ¶ added in v0.5.1
StartJetStreamServerFromConfig starts a JetStream server using the provided configuration StoreDir from config will not be used - instead, a tmp directory will be created for the test
Types ¶
type SuperCluster ¶
SuperCluster holds client connections and NATS servers
func NewJetStreamCluster ¶ added in v0.5.1
func NewJetStreamCluster(t *testing.T) *SuperCluster
func NewSuperCluster ¶
func NewSuperCluster(t *testing.T) *SuperCluster
NewSuperCluster creates a small supercluster for testing, with one client per server.
func (*SuperCluster) Shutdown ¶
func (sc *SuperCluster) Shutdown()
Shutdown shuts the supercluster down