ed8cfbbee4
Set Collector * set
25 lines
535 B
Go
25 lines
535 B
Go
package collector_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"queryorchestration/internal/collector"
|
|
"queryorchestration/internal/database/repository"
|
|
"queryorchestration/internal/serviceconfig"
|
|
|
|
"github.com/pashagolub/pgxmock/v3"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestService(t *testing.T) {
|
|
pool, err := pgxmock.NewPool()
|
|
require.NoError(t, err)
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
cfg.DBPool = pool
|
|
cfg.DBQueries = repository.New(pool)
|
|
|
|
svc := collector.New(cfg)
|
|
assert.NotNil(t, svc)
|
|
}
|