diff --git a/dump/dump.go b/dump/dump.go index 51fa2e7d7..402ce0d0d 100644 --- a/dump/dump.go +++ b/dump/dump.go @@ -6,7 +6,6 @@ import ( "fmt" "net/http" - "github.com/kong/deck/konnect" "github.com/kong/deck/utils" "github.com/kong/go-kong/kong" "golang.org/x/sync/errgroup" @@ -71,15 +70,7 @@ func getConsumerGroupsConfiguration(ctx context.Context, group *errgroup.Group, client *kong.Client, config Config, state *utils.KongRawState, ) { group.Go(func() error { - var ( - err error - consumerGroups []*kong.ConsumerGroupObject - ) - if config.KonnectRuntimeGroup != "" { - consumerGroups, err = GetAllKonnectConsumerGroups(ctx, client, config.SelectorTags) - } else { - consumerGroups, err = GetAllConsumerGroups(ctx, client, config.SelectorTags) - } + consumerGroups, err := GetAllConsumerGroups(ctx, client, config.SelectorTags) if err != nil { if kong.IsNotFoundErr(err) || kong.IsForbiddenErr(err) { return nil @@ -528,29 +519,6 @@ func GetAllUpstreams(ctx context.Context, return upstreams, nil } -// GetAllConsumerGroups queries Konnect for all the ConsumerGroups using client. -func GetAllKonnectConsumerGroups(ctx context.Context, - client *kong.Client, tags []string, -) ([]*kong.ConsumerGroupObject, error) { - var consumerGroupObjects []*kong.ConsumerGroupObject - opt := newOpt(tags) - cgs, err := konnect.ListAllConsumerGroups(ctx, client, opt.Tags) - if err != nil { - return nil, err - } - if err := ctx.Err(); err != nil { - return nil, err - } - for _, cg := range cgs { - r, err := konnect.GetConsumerGroupObject(ctx, client, cg.ID) - if err != nil { - return nil, err - } - consumerGroupObjects = append(consumerGroupObjects, r) - } - return consumerGroupObjects, nil -} - // GetAllConsumerGroups queries Kong for all the ConsumerGroups using client. func GetAllConsumerGroups(ctx context.Context, client *kong.Client, tags []string, diff --git a/tests/integration/sync_test.go b/tests/integration/sync_test.go index 2c769953a..531ad00d8 100644 --- a/tests/integration/sync_test.go +++ b/tests/integration/sync_test.go @@ -627,10 +627,10 @@ var ( { Name: kong.String("rate-limiting-advanced"), Config: kong.Configuration{ - "limit": []*int32{int32p(7)}, - "retry_after_jitter_max": int32p(1), - "window_size": []*int32{int32p(60)}, - "window_type": kong.String("sliding"), + "limit": []any{float64(7)}, + "retry_after_jitter_max": float64(1), + "window_size": []any{float64(60)}, + "window_type": "sliding", }, ConsumerGroup: &kong.ConsumerGroup{ ID: kong.String("521a90ad-36cb-4e31-a5db-1d979aee40d1"), @@ -652,10 +652,10 @@ var ( { Name: kong.String("rate-limiting-advanced"), Config: kong.Configuration{ - "limit": []*int32{int32p(10)}, - "retry_after_jitter_max": int32p(1), - "window_size": []*int32{int32p(60)}, - "window_type": kong.String("sliding"), + "limit": []any{float64(10)}, + "retry_after_jitter_max": float64(1), + "window_size": []any{float64(60)}, + "window_type": "sliding", }, ConsumerGroup: &kong.ConsumerGroup{ ID: kong.String("92177268-b134-42f9-909a-36f9d2d3d5e7"), @@ -2894,7 +2894,7 @@ func Test_Sync_ConsumerGroups_31(t *testing.T) { } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - runWhen(t, "enterprise", ">=3.1.0") + runWhen(t, "enterprise", "==3.1.0") teardown := setup(t) defer teardown(t)