Merged in feature/functestcov (pull request #84)

Function Test Coverage

* test

* scripts
This commit is contained in:
Michael McGuinness
2025-03-04 15:51:03 +00:00
parent 4b8c930ff1
commit d91ef1832b
85 changed files with 446 additions and 489 deletions
+3 -3
View File
@@ -6,15 +6,15 @@ import (
"queryorchestration/internal/serviceconfig"
"testing"
"github.com/stretchr/testify/require"
"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)
}
require.NoError(t, err)
cfg := &serviceconfig.BaseConfig{}
cfg.DBPool = pool
cfg.DBQueries = repository.New(pool)
+3 -3
View File
@@ -14,6 +14,8 @@ import (
"queryorchestration/internal/serviceconfig"
"testing"
"github.com/stretchr/testify/require"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/pashagolub/pgxmock/v3"
@@ -24,9 +26,7 @@ func TestTest(t *testing.T) {
ctx := context.Background()
pool, err := pgxmock.NewPool()
if err != nil {
t.Fatalf("failed to open pgxmock database: %v", err)
}
require.NoError(t, err)
cfg := &serviceconfig.BaseConfig{}
cfg.DBPool = pool
cfg.DBQueries = repository.New(pool)