customer/internal/initialize/brokers_test.go
Pasha 34a88a3a70
Some checks failed
Lint / Lint (push) Failing after 1m2s
rename go.mod
2024-11-18 21:44:09 +00:00

28 lines
663 B
Go

package initialize_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/twmb/franz-go/pkg/kgo"
"go.uber.org/zap"
"gitea.pena/PenaSide/customer/internal/initialize"
)
func TestNewBrokers(t *testing.T) {
t.Run("Брокеры должны успешно инициализироваться", func(t *testing.T) {
logger := zap.New(zap.L().Core())
assert.NotPanics(t, func() {
brokers := initialize.NewBrokers(initialize.BrokersDeps{
Logger: logger,
TariffClient: &kgo.Client{},
})
assert.NotNil(t, brokers)
assert.NotNil(t, brokers.TariffConsumer)
assert.NotNil(t, brokers.TariffProducer)
})
})
}