71f9802e1a
Split Query Running + Debugging Full Flow * completedquerysyncrunner * spliitinglogic * synccomplete * informdependents * only push same collector * deps * livetesting * foundissue * some issues resolved * activeupdate * collectorupdatefixes * fix dbquesries * tests * tests * pollingdebug
24 lines
561 B
Go
24 lines
561 B
Go
package result_test
|
|
|
|
import (
|
|
"queryorchestration/internal/database/repository"
|
|
"queryorchestration/internal/query/result"
|
|
"queryorchestration/internal/serviceconfig"
|
|
"testing"
|
|
|
|
"github.com/pashagolub/pgxmock/v3"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestService(t *testing.T) {
|
|
pool, err := pgxmock.NewPool()
|
|
if err != nil {
|
|
t.Fatalf("failed to open pgxmock database: %v", err)
|
|
}
|
|
cfg := &serviceconfig.BaseConfig{}
|
|
cfg.DBPool = pool
|
|
cfg.DBQueries = repository.New(pool)
|
|
svc := result.New(cfg, &result.Services{})
|
|
assert.NotNil(t, svc)
|
|
}
|