Merged in feature/textextract (pull request #108)

Start adding Textract + UUID changes

* base

* startclient

* ts

* short

* tests
This commit is contained in:
Michael McGuinness
2025-03-20 11:06:41 +00:00
parent 1587da9d11
commit 53ea7d34e6
196 changed files with 25972 additions and 1456 deletions
+4 -5
View File
@@ -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)