Merged in feature/richname (pull request #112)

Standardised rich name for Files

* tests
This commit is contained in:
Michael McGuinness
2025-04-03 19:17:24 +00:00
parent 1d49313a9f
commit 60812aba91
31 changed files with 744 additions and 601 deletions
+9 -5
View File
@@ -3,10 +3,10 @@ package doctextrunner_test
import (
"context"
"testing"
"time"
doctextrunner "queryorchestration/api/docTextRunner"
"queryorchestration/internal/database/repository"
"queryorchestration/internal/document"
documenttext "queryorchestration/internal/document/text"
"queryorchestration/internal/server/runner"
"queryorchestration/internal/serviceconfig/aws"
@@ -62,10 +62,14 @@ func TestDocCleanRunner(t *testing.T) {
}
cleanId := uuid.New()
inloc := document.Location{
Bucket: "bucket_name",
Key: "/i/am/here",
bucket := "hello"
key := objectstore.BucketKey{
CreatedAt: time.Now().UTC(),
ClientID: "hi",
EntityID: uuid.New(),
Location: objectstore.Import,
}
keyStr := key.String()
hash := "example"
pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(doc.DocumentID).WillReturnRows(
@@ -79,7 +83,7 @@ func TestDocCleanRunner(t *testing.T) {
}
pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(doc.DocumentID).WillReturnRows(
pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail", "externalClientId"}).
AddRow(cleanId, doc.DocumentID, &inloc.Bucket, &inloc.Key, int64(1), &hash, dbmimetype, repository.NullCleanfailtype{}, "clientId"),
AddRow(cleanId, doc.DocumentID, &bucket, &keyStr, int64(1), &hash, dbmimetype, repository.NullCleanfailtype{}, "clientId"),
)
jobId := "hello"
triggerId := uuid.New()