Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/stackit_dns_record-set_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ stackit dns record-set create [flags]
-h, --help Help for "stackit dns record-set create"
--name string Name of the record, should be compliant with RFC1035, Section 2.3.4
--record strings Records belonging to the record set
--ttl int Time to live, if not provided defaults to the zone's default TTL
--type string Record type, one of ["A" "AAAA" "SOA" "CNAME" "NS" "MX" "TXT" "SRV" "PTR" "ALIAS" "DNAME" "CAA" "DNSKEY" "DS" "LOC" "NAPTR" "SSHFP" "TLSA" "URI" "CERT" "SVCB" "TYPE" "CSYNC" "HINFO" "HTTPS"] (default "A")
--ttl int32 Time to live, if not provided defaults to the zone's default TTL
--type string Record type, one of ["A" "AAAA" "SOA" "CNAME" "NS" "MX" "TXT" "SRV" "PTR" "ALIAS" "DNAME" "CAA" "DNSKEY" "DS" "LOC" "NAPTR" "SSHFP" "TLSA" "URI" "CERT" "SVCB" "TYPE" "CSYNC" "HINFO" "HTTPS" "unknown_default_open_api"] (default "A")
--zone-id string Zone ID
```

Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_dns_record-set_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ stackit dns record-set update RECORD_SET_ID [flags]
-h, --help Help for "stackit dns record-set update"
--name string Name of the record, should be compliant with RFC1035, Section 2.3.4
--record strings Records belonging to the record set. If this flag is used, records already created that aren't set when running the command will be deleted
--ttl int Time to live, if not provided defaults to the zone's default TTL
--ttl int32 Time to live, if not provided defaults to the zone's default TTL
--zone-id string Zone ID
```

Expand Down
12 changes: 6 additions & 6 deletions docs/stackit_dns_zone_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ stackit dns zone create [flags]
```
--acl string Access control list
--contact-email string Contact email for the zone
--default-ttl int Default time to live (default 1000)
--default-ttl int32 Default time to live (default 1000)
--description string Description of the zone
--dns-name string Fully qualified domain name of the DNS zone
--expire-time int Expire time
--expire-time int32 Expire time
-h, --help Help for "stackit dns zone create"
--is-reverse-zone Is reverse zone
--name string User given name of the zone
--negative-cache int Negative cache
--negative-cache int32 Negative cache
--primary strings Primary name server for secondary zone
--refresh-time int Refresh time
--retry-time int Retry time
--type string Zone type, one of: ["primary" "secondary"]
--refresh-time int32 Refresh time
--retry-time int32 Retry time
--type string Zone type, one of: ["primary" "secondary" "unknown_default_open_api"]
```

### Options inherited from parent commands
Expand Down
10 changes: 5 additions & 5 deletions docs/stackit_dns_zone_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ stackit dns zone update ZONE_ID [flags]
```
--acl string Access control list
--contact-email string Contact email for the zone
--default-ttl int Default time to live (default 1000)
--default-ttl int32 Default time to live (default 1000)
--description string Description of the zone
--expire-time int Expire time
--expire-time int32 Expire time
-h, --help Help for "stackit dns zone update"
--name string User given name of the zone
--negative-cache int Negative cache
--negative-cache int32 Negative cache
--primary strings Primary name server for secondary zone
--refresh-time int Refresh time
--retry-time int Retry time
--refresh-time int32 Refresh time
--retry-time int32 Retry time
```

### Options inherited from parent commands
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/services/alb v0.14.2
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0
github.com/stackitcloud/stackit-sdk-go/services/edge v0.4.3
github.com/stackitcloud/stackit-sdk-go/services/git v0.14.0
github.com/stackitcloud/stackit-sdk-go/services/iaas v1.12.0
Expand All @@ -36,8 +36,8 @@ require (
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.7
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
github.com/zalando/go-keyring v0.2.6
golang.org/x/mod v0.34.0
golang.org/x/oauth2 v0.35.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0 h1:HxPgBu0
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0/go.mod h1:uYI9pHAA2g84jJN25ejFUxa0/JtfpPZqMDkctQ1BzJk=
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0 h1:Wqxx0PDTL2F5gqI5jjznuJY0TdqECltjA0aa/rHY63U=
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0/go.mod h1:MHB1N3EQ9GuAduAQoNS+gb1MjrWJieszbpOso9TQv5s=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6 h1:GBRb49x5Nax/oQQaaf2F3kKwv8DQQOL0TQOC0C/v/Ew=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6/go.mod h1:IX9iL3MigDZUmzwswTJMfYvyi118KAHrFMfjJUy5NYk=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0 h1:ZVkptfVCAqpaPWkE+WIopM9XdzqgbVcwmX5L1jZqqx8=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0/go.mod h1:FiYSv3D9rzgEVzi8Mpq5oYZBosrasa5uUYqVdEIbM1U=
github.com/stackitcloud/stackit-sdk-go/services/edge v0.4.3 h1:TxChb2qbO82JiQEBYClSSD5HZxqKeKJ6dIvkEUCJmbs=
github.com/stackitcloud/stackit-sdk-go/services/edge v0.4.3/go.mod h1:KVWvQHb7CQLD9DzA4Np3WmakiCCsrHaCXvFEnOQ7nPk=
github.com/stackitcloud/stackit-sdk-go/services/git v0.14.0 h1:VZBneGprCmHqckcSMPs3puBlK8rBpLMtYKmBktwdoVE=
Expand Down Expand Up @@ -654,10 +654,10 @@ github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0 h1:JWAFnskRbNKT8x62pZ
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0/go.mod h1:jMlBoXqrPNX5nXbo6oT7exalqilw1jiLPoIp4Cn0CdI=
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0 h1:QoKyQPe8FqDqJLNgE5uRlZ/y1c1GUxjV1DDLu5QEBD8=
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0/go.mod h1:KhVYCR58wETqdI7Quwhe3OR3BhB2T/b7DzaMsfDnr8g=
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0/go.mod h1:toIjQk1dhxdUFVyCWJJja0w/0nFpDid8MWX0ukQfvfo=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0 h1:PwjQeupEnXxhu+uWCUzO/hUfL4yqNblOcZbP2jvaQtU=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0/go.mod h1:toIjQk1dhxdUFVyCWJJja0w/0nFpDid8MWX0ukQfvfo=
github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g=
github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
35 changes: 17 additions & 18 deletions internal/cmd/dns/record-set/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"fmt"

"github.com/stackitcloud/stackit-sdk-go/services/dns/wait"
"github.com/stackitcloud/stackit-sdk-go/services/dns/v1api/wait"

"github.com/stackitcloud/stackit-cli/internal/pkg/types"

"github.com/spf13/cobra"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
dns "github.com/stackitcloud/stackit-sdk-go/services/dns/v1api"

"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
Expand All @@ -20,7 +20,6 @@ import (
"github.com/stackitcloud/stackit-cli/internal/pkg/services/dns/client"
dnsUtils "github.com/stackitcloud/stackit-cli/internal/pkg/services/dns/utils"
"github.com/stackitcloud/stackit-cli/internal/pkg/spinner"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
)

const (
Expand All @@ -41,8 +40,8 @@ type inputModel struct {
Comment *string
Name *string
Records []string
TTL *int64
Type dns.CreateRecordSetPayloadTypes
TTL *int32
Type dns.CreateRecordSetPayloadType
}

func NewCmd(params *types.CmdParams) *cobra.Command {
Expand All @@ -69,7 +68,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
return err
}

zoneLabel, err := dnsUtils.GetZoneName(ctx, apiClient, model.ProjectId, model.ZoneId)
zoneLabel, err := dnsUtils.GetZoneName(ctx, apiClient.DefaultAPI, model.ProjectId, model.ZoneId)
if err != nil {
params.Printer.Debug(print.ErrorLevel, "get zone name: %v", err)
zoneLabel = model.ZoneId
Expand All @@ -87,12 +86,12 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
if err != nil {
return fmt.Errorf("create DNS record set: %w", err)
}
recordSetId := *resp.Rrset.Id
recordSetId := resp.Rrset.Id

// Wait for async operation, if async mode not enabled
if !model.Async {
err := spinner.Run(params.Printer, "Creating record set", func() error {
_, err = wait.CreateRecordSetWaitHandler(ctx, apiClient, model.ProjectId, model.ZoneId, recordSetId).WaitWithContext(ctx)
_, err = wait.CreateRecordSetWaitHandler(ctx, apiClient.DefaultAPI, model.ProjectId, model.ZoneId, recordSetId).WaitWithContext(ctx)
return err
})
if err != nil {
Expand All @@ -109,14 +108,14 @@ func NewCmd(params *types.CmdParams) *cobra.Command {

func configureFlags(cmd *cobra.Command) {
var typeFlagOptions []string
for _, val := range dns.AllowedCreateRecordSetPayloadTypesEnumValues {
for _, val := range dns.AllowedCreateRecordSetPayloadTypeEnumValues {
typeFlagOptions = append(typeFlagOptions, string(val))
}

cmd.Flags().Var(flags.UUIDFlag(), zoneIdFlag, "Zone ID")
cmd.Flags().String(commentFlag, "", "User comment")
cmd.Flags().String(nameFlag, "", "Name of the record, should be compliant with RFC1035, Section 2.3.4")
cmd.Flags().Int64(ttlFlag, 0, "Time to live, if not provided defaults to the zone's default TTL")
cmd.Flags().Int32(ttlFlag, 0, "Time to live, if not provided defaults to the zone's default TTL")
cmd.Flags().StringSlice(recordFlag, []string{}, "Records belonging to the record set")
cmd.Flags().Var(flags.EnumFlag(false, string(defaultType), typeFlagOptions...), typeFlag, fmt.Sprintf("Record type, one of %q", typeFlagOptions))

Expand All @@ -138,8 +137,8 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
Comment: flags.FlagToStringPointer(p, cmd, commentFlag),
Name: flags.FlagToStringPointer(p, cmd, nameFlag),
Records: flags.FlagToStringSliceValue(p, cmd, recordFlag),
TTL: flags.FlagToInt64Pointer(p, cmd, ttlFlag),
Type: dns.CreateRecordSetPayloadTypes(recordType),
TTL: flags.FlagToInt32Pointer(p, cmd, ttlFlag),
Type: dns.CreateRecordSetPayloadType(recordType),
}

if model.Type == txtType {
Expand All @@ -163,16 +162,16 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
func buildRequest(ctx context.Context, model *inputModel, apiClient *dns.APIClient) dns.ApiCreateRecordSetRequest {
records := make([]dns.RecordPayload, 0)
for _, r := range model.Records {
records = append(records, dns.RecordPayload{Content: utils.Ptr(r)})
records = append(records, dns.RecordPayload{Content: r})
}

req := apiClient.CreateRecordSet(ctx, model.ProjectId, model.ZoneId)
req := apiClient.DefaultAPI.CreateRecordSet(ctx, model.ProjectId, model.ZoneId)
req = req.CreateRecordSetPayload(dns.CreateRecordSetPayload{
Comment: model.Comment,
Name: model.Name,
Records: &records,
Name: *model.Name,
Records: records,
Ttl: model.TTL,
Type: &model.Type,
Type: model.Type,
})
return req
}
Expand All @@ -186,7 +185,7 @@ func outputResult(p *print.Printer, model *inputModel, zoneLabel string, resp *d
if model.Async {
operationState = "Triggered creation of"
}
p.Outputf("%s record set for zone %s. Record set ID: %s\n", operationState, zoneLabel, utils.PtrString(resp.Rrset.Id))
p.Outputf("%s record set for zone %s. Record set ID: %s\n", operationState, zoneLabel, resp.Rrset.Id)
return nil
})
}
34 changes: 17 additions & 17 deletions internal/cmd/dns/record-set/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
dns "github.com/stackitcloud/stackit-sdk-go/services/dns/v1api"

"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
"github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
Expand All @@ -20,7 +20,7 @@ import (
type testCtxKey struct{}

var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
var testClient = &dns.APIClient{}
var testClient = &dns.APIClient{DefaultAPI: &dns.DefaultAPIService{}}
var testProjectId = uuid.NewString()
var testZoneId = uuid.NewString()

Expand Down Expand Up @@ -56,7 +56,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
Name: utils.Ptr("example.com"),
Comment: utils.Ptr("comment"),
Records: []string{"1.1.1.1"},
TTL: utils.Ptr(int64(3600)),
TTL: utils.Ptr(int32(3600)),
Type: "SOA",
}
for _, mod := range mods {
Expand All @@ -66,15 +66,15 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
}

func fixtureRequest(mods ...func(request *dns.ApiCreateRecordSetRequest)) dns.ApiCreateRecordSetRequest {
request := testClient.CreateRecordSet(testCtx, testProjectId, testZoneId)
request := testClient.DefaultAPI.CreateRecordSet(testCtx, testProjectId, testZoneId)
request = request.CreateRecordSetPayload(dns.CreateRecordSetPayload{
Name: utils.Ptr("example.com"),
Name: "example.com",
Comment: utils.Ptr("comment"),
Records: &[]dns.RecordPayload{
{Content: utils.Ptr("1.1.1.1")},
Records: []dns.RecordPayload{
{Content: "1.1.1.1"},
},
Ttl: utils.Ptr(int64(3600)),
Type: dns.CREATERECORDSETPAYLOADTYPE_SOA.Ptr(),
Ttl: utils.Ptr(int32(3600)),
Type: dns.CREATERECORDSETPAYLOADTYPE_SOA,
})
for _, mod := range mods {
mod(&request)
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestParseInput(t *testing.T) {
Name: utils.Ptr(""),
Comment: utils.Ptr(""),
Records: []string{"1.1.1.1"},
TTL: utils.Ptr(int64(0)),
TTL: utils.Ptr(int32(0)),
Type: defaultType,
},
},
Expand Down Expand Up @@ -297,13 +297,13 @@ func TestBuildRequest(t *testing.T) {
Records: []string{"1.1.1.1"},
Type: defaultType,
},
expectedRequest: testClient.CreateRecordSet(testCtx, testProjectId, testZoneId).
expectedRequest: testClient.DefaultAPI.CreateRecordSet(testCtx, testProjectId, testZoneId).
CreateRecordSetPayload(dns.CreateRecordSetPayload{
Name: utils.Ptr("example.com"),
Records: &[]dns.RecordPayload{
{Content: utils.Ptr("1.1.1.1")},
Name: "example.com",
Records: []dns.RecordPayload{
{Content: "1.1.1.1"},
},
Type: utils.Ptr(defaultType),
Type: defaultType,
}),
},
}
Expand All @@ -313,7 +313,7 @@ func TestBuildRequest(t *testing.T) {
request := buildRequest(testCtx, tt.model, testClient)

diff := cmp.Diff(request, tt.expectedRequest,
cmp.AllowUnexported(tt.expectedRequest),
cmp.AllowUnexported(tt.expectedRequest, dns.DefaultAPIService{}),
cmpopts.EquateComparable(testCtx),
)
if diff != "" {
Expand Down Expand Up @@ -343,7 +343,7 @@ func TestOutputResult(t *testing.T) {
name: "only record set as argument",
args: args{
model: fixtureInputModel(),
resp: &dns.RecordSetResponse{Rrset: &dns.RecordSet{}},
resp: &dns.RecordSetResponse{Rrset: dns.RecordSet{}},
},
wantErr: false,
},
Expand Down
12 changes: 6 additions & 6 deletions internal/cmd/dns/record-set/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"

"github.com/spf13/cobra"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
"github.com/stackitcloud/stackit-sdk-go/services/dns/wait"
dns "github.com/stackitcloud/stackit-sdk-go/services/dns/v1api"
"github.com/stackitcloud/stackit-sdk-go/services/dns/v1api/wait"
)

const (
Expand Down Expand Up @@ -58,13 +58,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
return err
}

zoneLabel, err := dnsUtils.GetZoneName(ctx, apiClient, model.ProjectId, model.ZoneId)
zoneLabel, err := dnsUtils.GetZoneName(ctx, apiClient.DefaultAPI, model.ProjectId, model.ZoneId)
if err != nil {
params.Printer.Debug(print.ErrorLevel, "get zone name: %v", err)
zoneLabel = model.ZoneId
}

recordSetLabel, err := dnsUtils.GetRecordSetName(ctx, apiClient, model.ProjectId, model.ZoneId, model.RecordSetId)
recordSetLabel, err := dnsUtils.GetRecordSetName(ctx, apiClient.DefaultAPI, model.ProjectId, model.ZoneId, model.RecordSetId)
if err != nil {
params.Printer.Debug(print.ErrorLevel, "get record set name: %v", err)
recordSetLabel = model.RecordSetId
Expand All @@ -89,7 +89,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
// Wait for async operation, if async mode not enabled
if !model.Async {
err := spinner.Run(params.Printer, "Deleting record set", func() error {
_, err = wait.DeleteRecordSetWaitHandler(ctx, apiClient, model.ProjectId, model.ZoneId, model.RecordSetId).WaitWithContext(ctx)
_, err = wait.DeleteRecordSetWaitHandler(ctx, apiClient.DefaultAPI, model.ProjectId, model.ZoneId, model.RecordSetId).WaitWithContext(ctx)
return err
})
if err != nil {
Expand Down Expand Up @@ -135,6 +135,6 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
}

func buildRequest(ctx context.Context, model *inputModel, apiClient *dns.APIClient) dns.ApiDeleteRecordSetRequest {
req := apiClient.DeleteRecordSet(ctx, model.ProjectId, model.ZoneId, model.RecordSetId)
req := apiClient.DefaultAPI.DeleteRecordSet(ctx, model.ProjectId, model.ZoneId, model.RecordSetId)
return req
}
8 changes: 4 additions & 4 deletions internal/cmd/dns/record-set/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/google/uuid"
"github.com/stackitcloud/stackit-sdk-go/services/dns"
dns "github.com/stackitcloud/stackit-sdk-go/services/dns/v1api"
)

type testCtxKey struct{}

var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
var testClient = &dns.APIClient{}
var testClient = &dns.APIClient{DefaultAPI: &dns.DefaultAPIService{}}
var testProjectId = uuid.NewString()
var testZoneId = uuid.NewString()
var testRecordSetId = uuid.NewString()
Expand Down Expand Up @@ -58,7 +58,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
}

func fixtureRequest(mods ...func(request *dns.ApiDeleteRecordSetRequest)) dns.ApiDeleteRecordSetRequest {
request := testClient.DeleteRecordSet(testCtx, testProjectId, testZoneId, testRecordSetId)
request := testClient.DefaultAPI.DeleteRecordSet(testCtx, testProjectId, testZoneId, testRecordSetId)
for _, mod := range mods {
mod(&request)
}
Expand Down Expand Up @@ -187,7 +187,7 @@ func TestBuildRequest(t *testing.T) {
request := buildRequest(testCtx, tt.model, testClient)

diff := cmp.Diff(request, tt.expectedRequest,
cmp.AllowUnexported(tt.expectedRequest),
cmp.AllowUnexported(tt.expectedRequest, dns.DefaultAPIService{}),
cmpopts.EquateComparable(testCtx),
)
if diff != "" {
Expand Down
Loading
Loading