@@ -174,8 +174,8 @@ func TestProcess(t *testing.T) {
|
||||
RequiredQueries: &[]types.UUID{contextQueryRes.JSON201.Id},
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
newActiveVersion := int32(2)
|
||||
_, err = qService.UpdateCollectorByClientIdWithResponse(ctx, clientRes.JSON201.Id, queryservice.CollectorUpdate{
|
||||
newActiveVersion := int32(1)
|
||||
_, err = qService.SetCollectorByClientIdWithResponse(ctx, clientRes.JSON201.Id, queryservice.CollectorSet{
|
||||
ActiveVersion: &newActiveVersion,
|
||||
Fields: &[]queryservice.CollectorField{
|
||||
{
|
||||
|
||||
@@ -80,20 +80,20 @@ func TestCollectorService(t *testing.T) {
|
||||
collRes, err := client.GetCollectorByClientIdWithResponse(ctx, id)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, id, collRes.JSON200.ClientId)
|
||||
assert.Equal(t, int32(1), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(1), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.MinimumCleanerVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.MinimumTextVersion)
|
||||
assert.Len(t, collRes.JSON200.Fields, 0)
|
||||
|
||||
av := int32(2)
|
||||
av := int32(1)
|
||||
fields := []queryservice.CollectorField{
|
||||
{
|
||||
Name: "json",
|
||||
QueryId: jsonRes.JSON201.Id,
|
||||
},
|
||||
}
|
||||
uRes, err := client.UpdateCollectorByClientIdWithResponse(ctx, id, queryservice.CollectorUpdate{
|
||||
uRes, err := client.SetCollectorByClientIdWithResponse(ctx, id, queryservice.CollectorSet{
|
||||
ActiveVersion: &av,
|
||||
Fields: &fields,
|
||||
})
|
||||
@@ -106,8 +106,8 @@ func TestCollectorService(t *testing.T) {
|
||||
collRes, err = client.GetCollectorByClientIdWithResponse(ctx, id)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, id, collRes.JSON200.ClientId)
|
||||
assert.Equal(t, int32(2), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(2), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, int32(1), collRes.JSON200.ActiveVersion)
|
||||
assert.Equal(t, int32(1), collRes.JSON200.LatestVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.MinimumCleanerVersion)
|
||||
assert.Equal(t, int32(0), collRes.JSON200.MinimumTextVersion)
|
||||
assert.Len(t, collRes.JSON200.Fields, 1)
|
||||
|
||||
Reference in New Issue
Block a user