Merged in bugfix/cleanup (pull request #10)
Clean Up Testing and Linting * somescriptcleanup * mostgolangci * deplatest * imageversions * usingscratch * movedqueuefrtesting * finishedunittesting * linting * taskfilecontext
This commit is contained in:
@@ -13,9 +13,9 @@ import (
|
||||
|
||||
func TestResults(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
pool, container := createDB(t, ctx)
|
||||
defer container.Terminate(ctx)
|
||||
queries := repository.New(pool)
|
||||
db, cleanup := createDB(t, ctx)
|
||||
defer cleanup()
|
||||
queries := repository.New(db.pool)
|
||||
|
||||
jsonQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeJsonExtractor))
|
||||
assert.Nil(t, err)
|
||||
@@ -46,7 +46,7 @@ func TestResults(t *testing.T) {
|
||||
Textversion: textVersion,
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 1, len(resultsByDoc))
|
||||
assert.Len(t, resultsByDoc, 1)
|
||||
assert.ElementsMatch(t, []repository.ListResultsByDocumentIDRow{
|
||||
{
|
||||
ID: jsonResultID,
|
||||
@@ -57,7 +57,7 @@ func TestResults(t *testing.T) {
|
||||
|
||||
results, err := queries.ListResultValuesByID(ctx, []pgtype.UUID{jsonResultID})
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 1, len(results))
|
||||
assert.Len(t, results, 1)
|
||||
assert.ElementsMatch(t, []repository.ListResultValuesByIDRow{
|
||||
{
|
||||
ID: jsonResultID,
|
||||
|
||||
Reference in New Issue
Block a user