Merged in feature/clean (pull request #76)

Clean Set Up

* fail

* starteddb

* constraint

* cleantest

* fixqueries

* fixtests

* storemimetype

* buffer

* tests

* setup

* passingtests

* pdfHElloWorld

* rm

* test

* notodos

* tests

* clean

* testpdf
This commit is contained in:
Michael McGuinness
2025-02-28 13:11:53 +00:00
parent a49084ebce
commit f11f4def43
198 changed files with 71722 additions and 146 deletions
+7 -2
View File
@@ -71,9 +71,14 @@ func TestDocCleanRunner(t *testing.T) {
AddRow(false),
)
cleanId := database.MustToDBUUID(uuid.New())
mimeType := "application/pdf"
dbmimetype := repository.NullCleanmimetypes{
Valid: true,
Cleanmimetypes: repository.Cleanmimetypes(mimeType),
}
pool.ExpectQuery("name: GetDocumentCleanEntry :one").WithArgs(database.MustToDBUUID(doc.ID)).WillReturnRows(
pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version"}).
AddRow(cleanId, database.MustToDBUUID(doc.ID), inloc.Bucket, inloc.Key, int32(1)),
pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}).
AddRow(cleanId, database.MustToDBUUID(doc.ID), &inloc.Bucket, &inloc.Key, int32(1), dbmimetype, repository.NullCleanfailtype{}),
)
pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(int32(1), inloc.Bucket, inloc.Key, cleanId).
WillReturnResult(pgxmock.NewResult("", 1))