Merged in feature/jobcrud (pull request #35)
Job CRUD + Collector Integration * startedcreate * openapispec * createjobintegration * jobgetcontroller * jobcreateclient * updatejob * job * collector
This commit is contained in:
@@ -100,7 +100,7 @@ func TestListQueries(t *testing.T) {
|
||||
assert.NotNil(t, res.Queries)
|
||||
assert.ElementsMatch(t, res.Queries, []queryservice.Query{
|
||||
{
|
||||
Id: id.String(),
|
||||
Id: id,
|
||||
Type: queryservice.CONTEXTFULL,
|
||||
ActiveVersion: 1,
|
||||
LatestVersion: 2,
|
||||
@@ -137,7 +137,7 @@ func TestGetQuery(t *testing.T) {
|
||||
AddRow(database.MustToDBUUID(id), repository.QuerytypeContextFull, int32(1), int32(2), nil, []pgtype.UUID{}),
|
||||
)
|
||||
|
||||
err = cons.GetQuery(ctx, id.String())
|
||||
err = cons.GetQuery(ctx, id)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, http.StatusOK, rec.Code)
|
||||
|
||||
@@ -145,7 +145,7 @@ func TestGetQuery(t *testing.T) {
|
||||
err = json.Unmarshal(rec.Body.Bytes(), &res)
|
||||
assert.Nil(t, err)
|
||||
assert.EqualExportedValues(t, queryservice.Query{
|
||||
Id: id.String(),
|
||||
Id: id,
|
||||
Type: queryservice.CONTEXTFULL,
|
||||
ActiveVersion: 1,
|
||||
LatestVersion: 2,
|
||||
@@ -194,7 +194,7 @@ func TestUpdateQuery(t *testing.T) {
|
||||
WillReturnResult(pgxmock.NewResult("", 1))
|
||||
pool.ExpectCommit()
|
||||
|
||||
err = cons.UpdateQuery(ctx, id.String())
|
||||
err = cons.UpdateQuery(ctx, id)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, http.StatusOK, rec.Code)
|
||||
assert.Empty(t, rec.Body.String())
|
||||
@@ -216,7 +216,7 @@ func TestTestQuery(t *testing.T) {
|
||||
})
|
||||
|
||||
body := queryservice.QueryTestRequest{
|
||||
DocumentId: uuid.NewString(),
|
||||
DocumentId: uuid.New(),
|
||||
}
|
||||
bodyBytes, err := json.Marshal(body)
|
||||
assert.Nil(t, err)
|
||||
@@ -229,7 +229,7 @@ func TestTestQuery(t *testing.T) {
|
||||
|
||||
id := uuid.New()
|
||||
|
||||
err = cons.TestQuery(ctx, id.String())
|
||||
err = cons.TestQuery(ctx, id)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, http.StatusOK, rec.Code)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user