ed8cfbbee4
Set Collector * set
24 lines
533 B
Go
24 lines
533 B
Go
package collectorset_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
collectorset "queryorchestration/internal/collector/set"
|
|
"queryorchestration/internal/database/repository"
|
|
|
|
"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 := &CollectorSetConfig{}
|
|
cfg.DBPool = pool
|
|
cfg.DBQueries = repository.New(pool)
|
|
|
|
svc := collectorset.New(cfg, &collectorset.Services{})
|
|
assert.NotNil(t, svc)
|
|
}
|