Skip to content

Commit 583add8

Browse files
authored
Merge branch 'main' into feat/STACKITCLI-361-iaas-sdk-migration
2 parents 0df8151 + b2baf90 commit 583add8

53 files changed

Lines changed: 745 additions & 710 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v6
20+
uses: actions/checkout@v6.0.2
2121

2222
- name: Install go
2323
uses: actions/setup-go@v6
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v6
50+
uses: actions/checkout@v6.0.2
5151

5252
- name: Check GoReleaser
5353
uses: goreleaser/goreleaser-action@v7.2.2

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v6
26+
uses: actions/checkout@v6.0.2
2727
with:
2828
# Allow goreleaser to access older tag information.
2929
fetch-depth: 0
@@ -106,7 +106,7 @@ jobs:
106106
AWS_SECRET_ACCESS_KEY: ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
107107
steps:
108108
- name: Checkout
109-
uses: actions/checkout@v6
109+
uses: actions/checkout@v6.0.2
110110

111111
# use the artifacts from the "goreleaser" job
112112
- name: Download artifacts from workflow
@@ -144,7 +144,7 @@ jobs:
144144
AWS_ENDPOINT_URL: https://object.storage.eu01.onstackit.cloud
145145
steps:
146146
- name: Checkout
147-
uses: actions/checkout@v6
147+
uses: actions/checkout@v6.0.2
148148

149149
- name: Download artifacts from workflow
150150
uses: actions/download-artifact@v8

docs/stackit_beta_sqlserverflex_instance_create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ stackit beta sqlserverflex instance create [flags]
2929
```
3030
--acl strings The access control list (ACL). Must contain at least one valid subnet, for instance '0.0.0.0/0' for open access (discouraged), '1.2.3.0/24 for a public IP range of an organization, '1.2.3.4/32' for a single IP range, etc. (default [])
3131
--backup-schedule string Backup schedule
32-
--cpu int Number of CPUs
32+
--cpu int32 Number of CPUs
3333
--edition string Edition of the SQLServer instance
3434
--flavor-id string ID of the flavor
3535
-h, --help Help for "stackit beta sqlserverflex instance create"
3636
-n, --name string Instance name
37-
--ram int Amount of RAM (in GB)
37+
--ram int32 Amount of RAM (in GB)
3838
--retention-days int The days for how long the backup files should be stored before being cleaned up
3939
--storage-class string Storage class
4040
--storage-size int Storage size (in GB)

docs/stackit_beta_sqlserverflex_instance_update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ stackit beta sqlserverflex instance update INSTANCE_ID [flags]
2525
```
2626
--acl strings Lists of IP networks in CIDR notation which are allowed to access this instance (default [])
2727
--backup-schedule string Backup schedule
28-
--cpu int Number of CPUs
28+
--cpu int32 Number of CPUs
2929
--flavor-id string ID of the flavor
3030
-h, --help Help for "stackit beta sqlserverflex instance update"
3131
-n, --name string Instance name
32-
--ram int Amount of RAM (in GB)
32+
--ram int32 Amount of RAM (in GB)
3333
--version string Version
3434
```
3535

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
1919
github.com/stackitcloud/stackit-sdk-go/services/alb v0.14.2
2020
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0
21-
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.10.0
21+
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0
2222
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6
2323
github.com/stackitcloud/stackit-sdk-go/services/edge v0.4.3
2424
github.com/stackitcloud/stackit-sdk-go/services/git v0.10.3
@@ -36,7 +36,7 @@ require (
3636
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0
3737
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.7
3838
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0
39-
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3
39+
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0
4040
github.com/zalando/go-keyring v0.2.6
4141
golang.org/x/mod v0.34.0
4242
golang.org/x/oauth2 v0.35.0

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,8 @@ github.com/stackitcloud/stackit-sdk-go/services/alb v0.14.2 h1:hGzfOJjlCRoFpri5e
600600
github.com/stackitcloud/stackit-sdk-go/services/alb v0.14.2/go.mod h1:eK6oRB5Tmpt6KbXQ4UYBGg2LgW5bPtVoncL9E8JSRww=
601601
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0 h1:HxPgBu04j5tj6nfZ2r0l6v4VXC0/tYOGe4sA5Addra8=
602602
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0/go.mod h1:uYI9pHAA2g84jJN25ejFUxa0/JtfpPZqMDkctQ1BzJk=
603-
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.10.0 h1:YALzjYAApyQMKyt4C2LKhPRZHa6brmbFeKuuwl+KOTs=
604-
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.10.0/go.mod h1:915b/lJgDikYFEoRQ8wc8aCtPvUCceYk7gGm9nViJe0=
603+
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0 h1:Wqxx0PDTL2F5gqI5jjznuJY0TdqECltjA0aa/rHY63U=
604+
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0/go.mod h1:MHB1N3EQ9GuAduAQoNS+gb1MjrWJieszbpOso9TQv5s=
605605
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6 h1:GBRb49x5Nax/oQQaaf2F3kKwv8DQQOL0TQOC0C/v/Ew=
606606
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6/go.mod h1:IX9iL3MigDZUmzwswTJMfYvyi118KAHrFMfjJUy5NYk=
607607
github.com/stackitcloud/stackit-sdk-go/services/edge v0.4.3 h1:TxChb2qbO82JiQEBYClSSD5HZxqKeKJ6dIvkEUCJmbs=
@@ -656,6 +656,8 @@ github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0 h1:QoKyQPe8FqDqJLNgE
656656
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0/go.mod h1:KhVYCR58wETqdI7Quwhe3OR3BhB2T/b7DzaMsfDnr8g=
657657
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3 h1:AQrcr+qeIuZob+3TT2q1L4WOPtpsu5SEpkTnOUHDqfE=
658658
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3/go.mod h1:8BBGC69WFXWWmKgzSjgE4HvsI7pEgO0RN2cASwuPJ18=
659+
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0 h1:PwjQeupEnXxhu+uWCUzO/hUfL4yqNblOcZbP2jvaQtU=
660+
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
659661
github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g=
660662
github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ=
661663
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

internal/cmd/beta/cdn/distribution/create/create.go

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/spf13/cobra"
88
sdkUtils "github.com/stackitcloud/stackit-sdk-go/core/utils"
9-
"github.com/stackitcloud/stackit-sdk-go/services/cdn"
9+
cdn "github.com/stackitcloud/stackit-sdk-go/services/cdn/v1api"
1010

1111
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1212
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -154,7 +154,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
154154
}
155155

156156
func configureFlags(cmd *cobra.Command, params *types.CmdParams) {
157-
cmd.Flags().Var(flags.EnumSliceFlag(false, []string{}, sdkUtils.EnumSliceToStringSlice(cdn.AllowedRegionEnumValues)...), flagRegion, fmt.Sprintf("Regions in which content should be cached, multiple of: %q", cdn.AllowedRegionEnumValues))
157+
cmd.Flags().Var(flags.EnumSliceFlag(false, []string{}, sdkUtils.EnumSliceToStringSlice(cdn.AllowedRegionEnumValues)...), flagRegion, fmt.Sprintf("Regions in which content should be cached, multiple of: %q", utils.FormatPossibleValues(sdkUtils.EnumSliceToStringSlice(cdn.AllowedRegionEnumValues)...)))
158158
cmd.Flags().Bool(flagHTTP, false, "Use HTTP backend")
159159
cmd.Flags().String(flagHTTPOriginURL, "", "Origin URL for HTTP backend")
160160
cmd.Flags().StringSlice(flagHTTPOriginRequestHeaders, []string{}, "Origin request headers for HTTP backend in the format 'HeaderName: HeaderValue', repeatable. WARNING: do not store sensitive values in the headers!")
@@ -264,27 +264,27 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
264264
}
265265

266266
func buildRequest(ctx context.Context, model *inputModel, apiClient *cdn.APIClient) cdn.ApiCreateDistributionRequest {
267-
req := apiClient.CreateDistribution(ctx, model.ProjectId)
268-
var backend cdn.CreateDistributionPayloadGetBackendArgType
267+
req := apiClient.DefaultAPI.CreateDistribution(ctx, model.ProjectId)
268+
var backend cdn.CreateDistributionPayloadBackend
269269
if model.HTTP != nil {
270-
backend = cdn.CreateDistributionPayloadGetBackendArgType{
270+
backend = cdn.CreateDistributionPayloadBackend{
271271
HttpBackendCreate: &cdn.HttpBackendCreate{
272272
Geofencing: model.HTTP.Geofencing,
273273
OriginRequestHeaders: model.HTTP.OriginRequestHeaders,
274-
OriginUrl: &model.HTTP.OriginURL,
275-
Type: utils.Ptr("http"),
274+
OriginUrl: model.HTTP.OriginURL,
275+
Type: "http",
276276
},
277277
}
278278
} else {
279-
backend = cdn.CreateDistributionPayloadGetBackendArgType{
279+
backend = cdn.CreateDistributionPayloadBackend{
280280
BucketBackendCreate: &cdn.BucketBackendCreate{
281-
BucketUrl: &model.Bucket.URL,
282-
Credentials: cdn.NewBucketCredentials(
281+
BucketUrl: model.Bucket.URL,
282+
Credentials: *cdn.NewBucketCredentials(
283283
model.Bucket.AccessKeyID,
284284
model.Bucket.Password,
285285
),
286-
Region: &model.Bucket.Region,
287-
Type: utils.Ptr("bucket"),
286+
Region: model.Bucket.Region,
287+
Type: "bucket",
288288
},
289289
}
290290
}
@@ -294,30 +294,28 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *cdn.APIClie
294294
model.Regions,
295295
)
296296
if len(model.BlockedCountries) > 0 {
297-
payload.BlockedCountries = &model.BlockedCountries
297+
payload.BlockedCountries = model.BlockedCountries
298298
}
299299
if len(model.BlockedIPs) > 0 {
300-
payload.BlockedIps = &model.BlockedIPs
300+
payload.BlockedIps = model.BlockedIPs
301301
}
302302
if model.DefaultCacheDuration != "" {
303303
payload.DefaultCacheDuration = utils.Ptr(model.DefaultCacheDuration)
304304
}
305305
if model.Loki != nil {
306-
payload.LogSink = &cdn.CreateDistributionPayloadGetLogSinkArgType{
307-
LokiLogSinkCreate: &cdn.LokiLogSinkCreate{
308-
Credentials: &cdn.LokiLogSinkCredentials{
309-
Password: &model.Loki.Password,
310-
Username: &model.Loki.Username,
311-
},
312-
PushUrl: &model.Loki.PushURL,
313-
Type: utils.Ptr("loki"),
306+
payload.LogSink = &cdn.LokiLogSinkCreate{
307+
Credentials: cdn.LokiLogSinkCredentials{
308+
Password: model.Loki.Password,
309+
Username: model.Loki.Username,
314310
},
311+
PushUrl: model.Loki.PushURL,
312+
Type: "loki",
315313
}
316314
}
317315
payload.MonthlyLimitBytes = model.MonthlyLimitBytes
318316
if model.Optimizer {
319-
payload.Optimizer = &cdn.CreateDistributionPayloadGetOptimizerArgType{
320-
Enabled: utils.Ptr(true),
317+
payload.Optimizer = &cdn.Optimizer{
318+
Enabled: true,
321319
}
322320
}
323321
return req.CreateDistributionPayload(*payload)
@@ -328,7 +326,7 @@ func outputResult(p *print.Printer, outputFormat, projectLabel string, resp *cdn
328326
return fmt.Errorf("create distribution response is nil")
329327
}
330328
return p.OutputResult(outputFormat, resp, func() error {
331-
p.Outputf("Created CDN distribution for %q. ID: %s\n", projectLabel, utils.PtrString(resp.Distribution.Id))
329+
p.Outputf("Created CDN distribution for %q. ID: %s\n", projectLabel, resp.Distribution.Id)
332330
return nil
333331
})
334332
}

internal/cmd/beta/cdn/distribution/create/create_test.go

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/google/go-cmp/cmp/cmpopts"
1111
"github.com/google/uuid"
1212
sdkUtils "github.com/stackitcloud/stackit-sdk-go/core/utils"
13-
"github.com/stackitcloud/stackit-sdk-go/services/cdn"
13+
cdn "github.com/stackitcloud/stackit-sdk-go/services/cdn/v1api"
1414
"k8s.io/utils/ptr"
1515

1616
"github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
@@ -23,7 +23,7 @@ import (
2323
type testCtxKey struct{}
2424

2525
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
26-
var testClient = &cdn.APIClient{}
26+
var testClient = &cdn.APIClient{DefaultAPI: &cdn.DefaultAPIService{}}
2727
var testProjectId = uuid.NewString()
2828

2929
const testRegions = cdn.REGION_EU
@@ -129,10 +129,10 @@ func modelLoki() func(model *inputModel) {
129129

130130
func fixturePayload(mods ...func(payload *cdn.CreateDistributionPayload)) cdn.CreateDistributionPayload {
131131
payload := *cdn.NewCreateDistributionPayload(
132-
cdn.CreateDistributionPayloadGetBackendArgType{
132+
cdn.CreateDistributionPayloadBackend{
133133
HttpBackendCreate: &cdn.HttpBackendCreate{
134-
Type: utils.Ptr("http"),
135-
OriginUrl: utils.Ptr("https://http-backend.example.com"),
134+
Type: "http",
135+
OriginUrl: "https://http-backend.example.com",
136136
},
137137
},
138138
[]cdn.Region{testRegions},
@@ -145,18 +145,18 @@ func fixturePayload(mods ...func(payload *cdn.CreateDistributionPayload)) cdn.Cr
145145

146146
func payloadRegions(regions ...cdn.Region) func(payload *cdn.CreateDistributionPayload) {
147147
return func(payload *cdn.CreateDistributionPayload) {
148-
payload.Regions = &regions
148+
payload.Regions = regions
149149
}
150150
}
151151

152152
func payloadBucketBackend() func(payload *cdn.CreateDistributionPayload) {
153153
return func(payload *cdn.CreateDistributionPayload) {
154-
payload.Backend = &cdn.CreateDistributionPayloadGetBackendArgType{
154+
payload.Backend = cdn.CreateDistributionPayloadBackend{
155155
BucketBackendCreate: &cdn.BucketBackendCreate{
156-
Type: utils.Ptr("bucket"),
157-
BucketUrl: utils.Ptr("https://bucket-backend.example.com"),
158-
Region: utils.Ptr("eu"),
159-
Credentials: cdn.NewBucketCredentials(
156+
Type: "bucket",
157+
BucketUrl: "https://bucket-backend.example.com",
158+
Region: "eu",
159+
Credentials: *cdn.NewBucketCredentials(
160160
"access-key-id",
161161
"",
162162
),
@@ -167,18 +167,16 @@ func payloadBucketBackend() func(payload *cdn.CreateDistributionPayload) {
167167

168168
func payloadLoki() func(payload *cdn.CreateDistributionPayload) {
169169
return func(payload *cdn.CreateDistributionPayload) {
170-
payload.LogSink = &cdn.CreateDistributionPayloadGetLogSinkArgType{
171-
LokiLogSinkCreate: &cdn.LokiLogSinkCreate{
172-
Type: utils.Ptr("loki"),
173-
PushUrl: utils.Ptr("https://loki.example.com"),
174-
Credentials: cdn.NewLokiLogSinkCredentials("", "loki-user"),
175-
},
170+
payload.LogSink = &cdn.LokiLogSinkCreate{
171+
Type: "loki",
172+
PushUrl: "https://loki.example.com",
173+
Credentials: *cdn.NewLokiLogSinkCredentials("", "loki-user"),
176174
}
177175
}
178176
}
179177

180178
func fixtureRequest(mods ...func(payload *cdn.CreateDistributionPayload)) cdn.ApiCreateDistributionRequest {
181-
req := testClient.CreateDistribution(testCtx, testProjectId)
179+
req := testClient.DefaultAPI.CreateDistribution(testCtx, testProjectId)
182180
req = req.CreateDistributionPayload(fixturePayload(mods...))
183181
return req
184182
}
@@ -466,11 +464,11 @@ func TestBuildRequest(t *testing.T) {
466464
expected: fixtureRequest(
467465
func(payload *cdn.CreateDistributionPayload) {
468466
payload.MonthlyLimitBytes = utils.Ptr[int64](5368709120)
469-
payload.Optimizer = &cdn.CreateDistributionPayloadGetOptimizerArgType{
470-
Enabled: utils.Ptr(true),
467+
payload.Optimizer = &cdn.Optimizer{
468+
Enabled: true,
471469
}
472-
payload.BlockedCountries = &[]string{"DE", "AT"}
473-
payload.BlockedIps = &[]string{"127.0.0.1"}
470+
payload.BlockedCountries = []string{"DE", "AT"}
471+
payload.BlockedIps = []string{"127.0.0.1"}
474472
payload.DefaultCacheDuration = utils.Ptr("PT2H")
475473
},
476474
),
@@ -488,7 +486,7 @@ func TestBuildRequest(t *testing.T) {
488486
request := buildRequest(testCtx, tt.model, testClient)
489487

490488
diff := cmp.Diff(request, tt.expected,
491-
cmp.AllowUnexported(tt.expected),
489+
cmp.AllowUnexported(tt.expected, cdn.DefaultAPIService{}),
492490
cmpopts.EquateComparable(testCtx),
493491
)
494492
if diff != "" {
@@ -516,8 +514,8 @@ func TestOutputResult(t *testing.T) {
516514
description: "table output",
517515
outputFormat: "table",
518516
response: &cdn.CreateDistributionResponse{
519-
Distribution: &cdn.Distribution{
520-
Id: ptr.To("dist-1234"),
517+
Distribution: cdn.Distribution{
518+
Id: "dist-1234",
521519
},
522520
},
523521
expected: fmt.Sprintf("Created CDN distribution for %q. ID: dist-1234\n", testProjectId),

internal/cmd/beta/cdn/distribution/delete/delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66

77
"github.com/spf13/cobra"
8-
"github.com/stackitcloud/stackit-sdk-go/services/cdn"
8+
cdn "github.com/stackitcloud/stackit-sdk-go/services/cdn/v1api"
99

1010
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1111
"github.com/stackitcloud/stackit-cli/internal/pkg/examples"
@@ -89,5 +89,5 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
8989
}
9090

9191
func buildRequest(ctx context.Context, model *inputModel, apiClient *cdn.APIClient) cdn.ApiDeleteDistributionRequest {
92-
return apiClient.DeleteDistribution(ctx, model.ProjectId, model.DistributionID)
92+
return apiClient.DefaultAPI.DeleteDistribution(ctx, model.ProjectId, model.DistributionID)
9393
}

internal/cmd/beta/cdn/distribution/delete/delete_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/google/go-cmp/cmp"
88
"github.com/google/go-cmp/cmp/cmpopts"
99
"github.com/google/uuid"
10-
"github.com/stackitcloud/stackit-sdk-go/services/cdn"
10+
cdn "github.com/stackitcloud/stackit-sdk-go/services/cdn/v1api"
1111

1212
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1313
"github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
@@ -18,7 +18,7 @@ type testCtxKey struct{}
1818
var (
1919
testCtx = context.WithValue(context.Background(), testCtxKey{}, "test")
2020
testProjectId = uuid.NewString()
21-
testClient = &cdn.APIClient{}
21+
testClient = &cdn.APIClient{DefaultAPI: &cdn.DefaultAPIService{}}
2222
testDistributionID = uuid.NewString()
2323
)
2424

@@ -57,7 +57,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
5757
}
5858

5959
func fixtureRequest(mods ...func(request *cdn.ApiDeleteDistributionRequest)) cdn.ApiDeleteDistributionRequest {
60-
request := testClient.DeleteDistribution(testCtx, testProjectId, testDistributionID)
60+
request := testClient.DefaultAPI.DeleteDistribution(testCtx, testProjectId, testDistributionID)
6161
for _, mod := range mods {
6262
mod(&request)
6363
}
@@ -120,7 +120,7 @@ func TestBuildRequest(t *testing.T) {
120120
request := buildRequest(testCtx, tt.model, testClient)
121121

122122
diff := cmp.Diff(request, tt.expectedResult,
123-
cmp.AllowUnexported(tt.expectedResult),
123+
cmp.AllowUnexported(tt.expectedResult, cdn.DefaultAPIService{}),
124124
cmpopts.EquateComparable(testCtx),
125125
)
126126
if diff != "" {

0 commit comments

Comments
 (0)