Merged in feature/textextract (pull request #108)
Start adding Textract + UUID changes * base * startclient * ts * short * tests
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/document"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
@@ -33,10 +32,10 @@ func TestGetSummary(t *testing.T) {
|
||||
Hash: "example_hash",
|
||||
}
|
||||
|
||||
pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(database.MustToDBUUID(doc.ID)).
|
||||
pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(doc.ID).
|
||||
WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "clientId", "hash"}).
|
||||
AddRow(database.MustToDBUUID(doc.ID), database.MustToDBUUID(doc.ClientID), doc.Hash),
|
||||
AddRow(doc.ID, doc.ClientID, doc.Hash),
|
||||
)
|
||||
|
||||
adoc, err := svc.GetSummary(ctx, doc.ID)
|
||||
@@ -64,10 +63,10 @@ func TestGetExternal(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(database.MustToDBUUID(doc.Id)).
|
||||
pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(&doc.Id).
|
||||
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"}`)),
|
||||
)
|
||||
|
||||
adoc, err := svc.GetExternal(ctx, doc.Id)
|
||||
|
||||
Reference in New Issue
Block a user