45 lines
712 B
Go
Raw Normal View History

package main
import (
"context"
"testing"
"github.com/stretchr/testify/suite"
"github.com/waku-org/go-waku/waku/v2/node"
"github.com/waku-org/go-waku/waku/v2/utils"
)
var log = utils.Logger().Named("TEST")
func TestStoreSuite(t *testing.T) {
suite.Run(t, new(StoreSuite))
}
type StoreSuite struct {
suite.Suite
2023-07-14 12:54:58 -04:00
nodes []*node.WakuNode
}
func (s *StoreSuite) SetupSuite() {
2023-07-14 12:54:58 -04:00
for i := 0; i < 5; i++ {
wakuNode, err := node.New(
node.WithNTP(),
node.WithWakuRelayAndMinPeers(1),
)
2023-07-14 12:54:58 -04:00
s.NoError(err)
2023-07-14 12:54:58 -04:00
err = wakuNode.Start(context.Background())
s.NoError(err)
2023-07-14 12:54:58 -04:00
s.nodes = append(s.nodes, wakuNode)
}
}
func (s *StoreSuite) TearDownSuite() {
2023-07-14 12:54:58 -04:00
for _, x := range s.nodes {
x.Stop()
}
}