Merged in feature/listtypes (pull request #23)

Feature/listtypes

* started

* cleanuplist

* someunittestfixes

* removemostflakiness
This commit is contained in:
Michael McGuinness
2025-01-15 12:19:49 +00:00
parent 7da57058d4
commit 5ca36b0502
38 changed files with 532 additions and 366 deletions
+3 -2
View File
@@ -62,6 +62,7 @@ func TestQueryRunner(t *testing.T) {
URL: qCfg.URL,
Client: qCfg.Client,
}
qV := int32(1)
pool.ExpectQuery("name: GetCollectorFromJobID :one").WithArgs(database.MustToDBUUID(doc.JobID)).
WillReturnRows(
@@ -71,12 +72,12 @@ func TestQueryRunner(t *testing.T) {
pool.ExpectQuery("name: ListResultsByDocumentID :many").WithArgs(database.MustToDBUUID(doc.ID), minCleanVersion, minTextVersion).
WillReturnRows(
pgxmock.NewRows([]string{"id", "queryId", "queryVersion"}).
AddRow(collectorID, queryID, int32(1)),
AddRow(collectorID, queryID, qV),
)
pool.ExpectQuery("name: GetCollectorQueries :many").WithArgs(collectorID).
WillReturnRows(
pgxmock.NewRows([]string{"collectorId", "queryId", "type", "queryVersion", "requiredIds"}).
AddRow(collectorID, queryID, repository.NullQuerytype{Querytype: repository.QuerytypeContextFull, Valid: true}, pgtype.Int4{Int32: int32(1), Valid: true}, []pgtype.UUID{}),
AddRow(collectorID, queryID, repository.NullQuerytype{Querytype: repository.QuerytypeContextFull, Valid: true}, &qV, []pgtype.UUID{}),
)
err = runner.Process(ctx, cfg, msg)