2019-07-16 10:43:07 +00:00
|
|
|
package publisher
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/suite"
|
2019-07-18 13:41:48 +00:00
|
|
|
"go.uber.org/zap"
|
2019-07-30 18:36:42 +00:00
|
|
|
|
|
|
|
"github.com/status-im/status-protocol-go/tt"
|
2019-07-16 10:43:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestServiceTestSuite(t *testing.T) {
|
|
|
|
suite.Run(t, new(PublisherTestSuite))
|
|
|
|
}
|
|
|
|
|
|
|
|
type PublisherTestSuite struct {
|
|
|
|
suite.Suite
|
|
|
|
publisher *Publisher
|
2019-07-18 13:41:48 +00:00
|
|
|
logger *zap.Logger
|
2019-07-16 10:43:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PublisherTestSuite) SetupTest(installationID string) {
|
2019-07-30 18:36:42 +00:00
|
|
|
p.logger = tt.MustCreateTestLogger()
|
2019-08-22 08:38:05 +00:00
|
|
|
p.publisher = New(p.logger)
|
2019-07-18 13:41:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (p *PublisherTestSuite) TearDownTest() {
|
2019-07-21 05:40:12 +00:00
|
|
|
_ = p.logger.Sync()
|
2019-07-16 10:43:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO(adam): provide more tests
|