Merged in feature/textextract (pull request #108)
Start adding Textract + UUID changes * base * startclient * ts * short * tests
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/document"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -54,10 +53,10 @@ func TestTrigger(t *testing.T) {
|
||||
|
||||
svc.batchSize = 1
|
||||
total := int64(2)
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(database.MustToDBUUID(clientId), svc.batchSize, int32(0)).
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(clientId, svc.batchSize, int32(0)).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "totalCount"}).
|
||||
AddRow(database.MustToDBUUID(docs[0].ID), &total),
|
||||
AddRow(&docs[0].ID, &total),
|
||||
)
|
||||
mockSQS.EXPECT().
|
||||
SendMessage(
|
||||
@@ -68,10 +67,10 @@ func TestTrigger(t *testing.T) {
|
||||
mock.Anything,
|
||||
).
|
||||
Return(&sqs.SendMessageOutput{}, nil)
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(database.MustToDBUUID(clientId), svc.batchSize, int32(1)).
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(clientId, svc.batchSize, int32(1)).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "totalCount"}).
|
||||
AddRow(database.MustToDBUUID(docs[1].ID), &total),
|
||||
AddRow(&docs[1].ID, &total),
|
||||
)
|
||||
mockSQS.EXPECT().
|
||||
SendMessage(
|
||||
@@ -104,7 +103,7 @@ func TestTrigger(t *testing.T) {
|
||||
clientId := uuid.New()
|
||||
|
||||
svc.batchSize = 1
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(database.MustToDBUUID(clientId), svc.batchSize, int32(0)).
|
||||
pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(clientId, svc.batchSize, int32(0)).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "totalCount"}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user