1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

set jetstream=true in nats server for testing

This commit is contained in:
postmannen 2024-11-29 13:55:54 +01:00
parent 3ff67a5f1f
commit 5776baad37

View file

@ -93,8 +93,9 @@ func newServerForTesting(addressAndPort string, testFolder string) (*server, *Co
func newNatsServerForTesting(port int) *natsserver.Server { func newNatsServerForTesting(port int) *natsserver.Server {
// Start up the nats-server message broker. // Start up the nats-server message broker.
nsOpt := &natsserver.Options{ nsOpt := &natsserver.Options{
Host: "127.0.0.1", Host: "127.0.0.1",
Port: port, Port: port,
JetStream: true,
} }
ns, err := natsserver.NewServer(nsOpt) ns, err := natsserver.NewServer(nsOpt)