Merged in feature/docinitialisation (pull request #41)

Queuing Changes and Cfg Testing

* staarting

* staarting

* startedpush

* note

* save

* mocking

* removederrs

* fixtests

* cleanuperrs

* newenvsetup

* preppingtests

* queue

* mmovetocfgpassunittests

* sortoutconfig

* passinginteg

* deps

* fixtests
This commit is contained in:
Michael McGuinness
2025-02-03 17:30:50 +00:00
parent 15adaebfcd
commit 7001ca854c
135 changed files with 3916 additions and 1523 deletions
+9 -9
View File
@@ -26,17 +26,17 @@ func TestGetCreator(t *testing.T) {
queryType := resultprocessor.Type(resultprocessor.TypeContextFull)
creator, err := svc.getCreator(queryType)
assert.Nil(t, err)
assert.NoError(t, err)
assert.NotNil(t, creator)
queryType = resultprocessor.Type(resultprocessor.TypeJsonExtractor)
creator, err = svc.getCreator(queryType)
assert.Nil(t, err)
assert.NoError(t, err)
assert.NotNil(t, creator)
queryType = resultprocessor.Type(-1)
_, err = svc.getCreator(queryType)
assert.NotNil(t, err)
assert.Error(t, err)
}
func TestParseCreateQuery(t *testing.T) {
@@ -50,7 +50,7 @@ func TestParseCreateQuery(t *testing.T) {
}
resultQuery, err := parseCreateQuery(cQuery)
assert.Nil(t, err)
assert.NoError(t, err)
rQIDs := database.MustToDBUUIDArray(*cQuery.RequiredQueryIDs)
qcfg := []byte(*cQuery.Config)
assert.EqualExportedValues(t, createQuery{
@@ -102,7 +102,7 @@ func TestSubmitCreate(t *testing.T) {
}
dbType, err := resultprocessor.ToDBQueryType(create.Type)
assert.Nil(t, err)
assert.NoError(t, err)
pool.ExpectBeginTx(pgx.TxOptions{})
pool.ExpectQuery("name: CreateQuery :one").WithArgs(dbType).WillReturnRows(
@@ -118,7 +118,7 @@ func TestSubmitCreate(t *testing.T) {
pool.ExpectCommit()
id, err := svc.submitCreate(ctx, create)
assert.Nil(t, err)
assert.NoError(t, err)
assert.Equal(t, q.ID, id)
}
@@ -143,7 +143,7 @@ func TestSubmitCreateNoReqsOrConfig(t *testing.T) {
}
dbType, err := resultprocessor.ToDBQueryType(create.Type)
assert.Nil(t, err)
assert.NoError(t, err)
pool.ExpectBeginTx(pgx.TxOptions{})
pool.ExpectQuery("name: CreateQuery :one").WithArgs(dbType).WillReturnRows(
@@ -153,7 +153,7 @@ func TestSubmitCreateNoReqsOrConfig(t *testing.T) {
pool.ExpectCommit()
id, err := svc.submitCreate(ctx, create)
assert.Nil(t, err)
assert.NoError(t, err)
assert.Equal(t, q.ID, id)
}
@@ -182,7 +182,7 @@ func TestNormalizeCreate(t *testing.T) {
)
err = svc.normalizeCreate(ctx, create)
assert.Nil(t, err)
assert.NoError(t, err)
assert.EqualExportedValues(t, resultprocessor.Create{
Type: resultprocessor.TypeJsonExtractor,
Config: nil,