Merged in feature/functestcov (pull request #84)
Function Test Coverage * test * scripts
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/google/uuid"
|
||||
"github.com/pashagolub/pgxmock/v3"
|
||||
@@ -21,9 +23,7 @@ import (
|
||||
func TestClean(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 := &DocCleanConfig{}
|
||||
cfg.DBPool = pool
|
||||
@@ -166,9 +166,7 @@ func TestExecuteCleanTasks(t *testing.T) {
|
||||
func TestStoreClean(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 := &DocCleanConfig{}
|
||||
cfg.DBPool = pool
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/pashagolub/pgxmock/v3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type DocCleanConfig struct {
|
||||
@@ -33,9 +34,7 @@ type DocCleanConfig 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user