Merged in feature/update (pull request #27)

Query Update

* baselineupdate

* baseupdateplusmodelupdates

* passtests

* somemoresubmittesting

* testinnerfunctions

* readmeandinstall

* cleanerstartup

* readmeplusdeps

* tidyatrighttime

* validatetests

* normalizedontvalidate

* abitofzenormalizationcleanup

* addunitstestforhelperfuns

* normalizeactiveversiontestas
This commit is contained in:
Michael McGuinness
2025-01-20 13:31:48 +00:00
parent 897fd1c6dd
commit 518927c395
52 changed files with 1705 additions and 461 deletions
+6 -2
View File
@@ -10,6 +10,7 @@ import (
"testing"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/pashagolub/pgxmock/v3"
"github.com/stretchr/testify/assert"
)
@@ -60,13 +61,16 @@ func TestGetCollectorQueries(t *testing.T) {
dbCollectorID := database.MustToDBUUID(svc.collector.ID)
collectorQueries := []*queryprocessor.Query{
{ID: uuid.New(), Type: queryprocessor.TypeContextFull, RequiredQueryIDs: []uuid.UUID{}, Version: int32(1)},
{ID: uuid.New(), Type: queryprocessor.TypeContextFull, Version: int32(1)},
}
rows := pgxmock.NewRows([]string{"collectorId", "queryId", "type", "queryVersion", "requiredIds"})
for _, q := range collectorQueries {
dbID := database.MustToDBUUID(q.ID)
dbReqIDs := database.MustToDBUUIDArray(q.RequiredQueryIDs)
dbReqIDs := []pgtype.UUID{}
if q.RequiredQueryIDs != nil {
dbReqIDs = database.MustToDBUUIDArray(*q.RequiredQueryIDs)
}
ty, err := queryprocessor.ToDBNullQueryType(q.Type)
assert.Nil(t, err)
rows = rows.