Merged in feature/functestcov (pull request #84)
Function Test Coverage * test * scripts
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
queuemock "queryorchestration/mocks/queue"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/service/sqs"
|
||||
"github.com/google/uuid"
|
||||
"github.com/pashagolub/pgxmock/v3"
|
||||
@@ -27,9 +29,7 @@ type DocTextConfig struct {
|
||||
func TestCreate(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)
|
||||
|
||||
mockSQS := queuemock.NewMockSQSClient(t)
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
textversion "queryorchestration/internal/document/text/version"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/pashagolub/pgxmock/v3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -16,9 +18,7 @@ import (
|
||||
func TestExtract(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 := &DocTextConfig{}
|
||||
cfg.DBPool = pool
|
||||
|
||||
Reference in New Issue
Block a user