Merged in feature/textextract (pull request #108)
Start adding Textract + UUID changes * base * startclient * ts * short * tests
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
|
||||
queryapi "queryorchestration/api/queryAPI"
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/document"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -57,7 +56,7 @@ func TestListDocumentsByClientId(t *testing.T) {
|
||||
pool.ExpectQuery("name: ListDocumentsByClientExternalId :many").WithArgs(clientId).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "hash"}).
|
||||
AddRow(database.MustToDBUUID(doc[0].Id), "hash"),
|
||||
AddRow(doc[0].Id, "hash"),
|
||||
)
|
||||
|
||||
err = cons.ListDocumentsByClientId(ctx, clientId)
|
||||
@@ -104,10 +103,10 @@ func TestGetDocument(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(database.MustToDBUUID(docId)).
|
||||
pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(&docId).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "clientId", "hash", "fields"}).
|
||||
AddRow(database.MustToDBUUID(doc.Id), "externalID", "example", []byte(`{"json": "hello"}`)),
|
||||
AddRow(doc.Id, "externalID", "example", []byte(`{"json": "hello"}`)),
|
||||
)
|
||||
|
||||
err = cons.GetDocument(ctx, docId)
|
||||
|
||||
Reference in New Issue
Block a user