Merged in feature/jobcrud (pull request #35)
Job CRUD + Collector Integration * startedcreate * openapispec * createjobintegration * jobgetcontroller * jobcreateclient * updatejob * job * collector
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/oapi-codegen/runtime/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -28,12 +29,12 @@ func TestParseQueries(t *testing.T) {
|
||||
assert.Len(t, out, len(in))
|
||||
assert.ElementsMatch(t, []Query{
|
||||
{
|
||||
Id: in[0].ID.String(),
|
||||
Id: in[0].ID,
|
||||
Type: CONTEXTFULL,
|
||||
ActiveVersion: 1,
|
||||
LatestVersion: 2,
|
||||
RequiredQueries: &[]string{
|
||||
(*in[0].RequiredQueryIDs)[0].String(),
|
||||
RequiredQueries: &[]types.UUID{
|
||||
(*in[0].RequiredQueryIDs)[0],
|
||||
},
|
||||
Config: in[0].Config,
|
||||
},
|
||||
@@ -55,12 +56,12 @@ func TestParseQuery(t *testing.T) {
|
||||
out, err := parseQuery(in)
|
||||
assert.Nil(t, err)
|
||||
assert.EqualExportedValues(t, Query{
|
||||
Id: in.ID.String(),
|
||||
Id: in.ID,
|
||||
Type: CONTEXTFULL,
|
||||
ActiveVersion: 1,
|
||||
LatestVersion: 2,
|
||||
RequiredQueries: &[]string{
|
||||
(*in.RequiredQueryIDs)[0].String(),
|
||||
RequiredQueries: &[]types.UUID{
|
||||
(*in.RequiredQueryIDs)[0],
|
||||
},
|
||||
Config: in.Config,
|
||||
},
|
||||
@@ -77,7 +78,7 @@ func TestParseQueryMinimal(t *testing.T) {
|
||||
out, err := parseQuery(in)
|
||||
assert.Nil(t, err)
|
||||
assert.EqualExportedValues(t, Query{
|
||||
Id: in.ID.String(),
|
||||
Id: in.ID,
|
||||
Type: CONTEXTFULL,
|
||||
ActiveVersion: 1,
|
||||
LatestVersion: 2,
|
||||
|
||||
Reference in New Issue
Block a user