Merged in feature/textextract (pull request #108)
Start adding Textract + UUID changes * base * startclient * ts * short * tests
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
queryapi "queryorchestration/api/queryAPI"
|
||||
"queryorchestration/internal/client"
|
||||
"queryorchestration/internal/database"
|
||||
"queryorchestration/internal/database/repository"
|
||||
"queryorchestration/internal/serviceconfig"
|
||||
|
||||
@@ -48,7 +47,7 @@ func TestCreateClient(t *testing.T) {
|
||||
|
||||
pool.ExpectQuery("name: CreateClient :one").WithArgs(body.Id, body.Name).WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id"}).
|
||||
AddRow(database.MustToDBUUID(uuid.New())),
|
||||
AddRow(uuid.New()),
|
||||
)
|
||||
|
||||
err = cons.CreateClient(ctx)
|
||||
@@ -81,7 +80,7 @@ func TestGetClient(t *testing.T) {
|
||||
|
||||
pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}).
|
||||
AddRow(database.MustToDBUUID(clientUid), "client_id", "client_name", true),
|
||||
AddRow(clientUid, "client_id", "client_name", true),
|
||||
)
|
||||
|
||||
err = cons.GetClient(ctx, id)
|
||||
@@ -132,14 +131,14 @@ func TestUpdateClient(t *testing.T) {
|
||||
|
||||
pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}).
|
||||
AddRow(database.MustToDBUUID(intid), "clientid", "client_name", true),
|
||||
AddRow(intid, "clientid", "client_name", true),
|
||||
)
|
||||
pool.ExpectQuery("name: GetClient :one").WithArgs(database.MustToDBUUID(intid)).WillReturnRows(
|
||||
pool.ExpectQuery("name: GetClient :one").WithArgs(intid).WillReturnRows(
|
||||
pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}).
|
||||
AddRow(database.MustToDBUUID(intid), "clientid", "client_name", true),
|
||||
AddRow(intid, "clientid", "client_name", true),
|
||||
)
|
||||
pool.ExpectBegin()
|
||||
pool.ExpectExec("name: AddClientCanSync :exec").WithArgs(*body.CanSync, database.MustToDBUUID(intid)).
|
||||
pool.ExpectExec("name: AddClientCanSync :exec").WithArgs(*body.CanSync, intid).
|
||||
WillReturnResult(pgxmock.NewResult("", 1))
|
||||
pool.ExpectCommit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user