Update SDK dependencies (#100)
* Update dependencies * Fix tests * Fix field assignment * Update field assignment * Remove unused functions --------- Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
9937717104
commit
c3618f2b63
35 changed files with 249 additions and 224 deletions
|
|
@ -22,7 +22,6 @@ import (
|
|||
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||
"github.com/stackitcloud/stackit-sdk-go/services/dns"
|
||||
"github.com/stackitcloud/stackit-sdk-go/services/dns/wait"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
|
||||
)
|
||||
|
|
@ -452,7 +451,7 @@ func mapFields(recordSetResp *dns.RecordSetResponse, model *Model) error {
|
|||
model.Error = types.StringPointerValue(recordSet.Error)
|
||||
model.Name = types.StringPointerValue(recordSet.Name)
|
||||
model.State = types.StringPointerValue(recordSet.State)
|
||||
model.TTL = conversion.ToTypeInt64(recordSet.Ttl)
|
||||
model.TTL = types.Int64PointerValue(recordSet.Ttl)
|
||||
model.Type = types.StringPointerValue(recordSet.Type)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -477,7 +476,7 @@ func toCreatePayload(model *Model) (*dns.CreateRecordSetPayload, error) {
|
|||
Comment: model.Comment.ValueStringPointer(),
|
||||
Name: model.Name.ValueStringPointer(),
|
||||
Records: &records,
|
||||
Ttl: conversion.ToPtrInt32(model.TTL),
|
||||
Ttl: model.TTL.ValueInt64Pointer(),
|
||||
Type: model.Type.ValueStringPointer(),
|
||||
}, nil
|
||||
}
|
||||
|
|
@ -502,6 +501,6 @@ func toUpdatePayload(model *Model) (*dns.UpdateRecordSetPayload, error) {
|
|||
Comment: model.Comment.ValueStringPointer(),
|
||||
Name: model.Name.ValueStringPointer(),
|
||||
Records: &records,
|
||||
Ttl: conversion.ToPtrInt32(model.TTL),
|
||||
Ttl: model.TTL.ValueInt64Pointer(),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ func TestMapFields(t *testing.T) {
|
|||
{Content: utils.Ptr("record_2")},
|
||||
},
|
||||
State: utils.Ptr("state"),
|
||||
Ttl: utils.Ptr(int32(1)),
|
||||
Ttl: utils.Ptr(int64(1)),
|
||||
Type: utils.Ptr("type"),
|
||||
},
|
||||
},
|
||||
|
|
@ -88,7 +88,7 @@ func TestMapFields(t *testing.T) {
|
|||
Name: utils.Ptr("name"),
|
||||
Records: nil,
|
||||
State: utils.Ptr("state"),
|
||||
Ttl: utils.Ptr(int32(2123456789)),
|
||||
Ttl: utils.Ptr(int64(2123456789)),
|
||||
Type: utils.Ptr("type"),
|
||||
},
|
||||
},
|
||||
|
|
@ -178,7 +178,7 @@ func TestToCreatePayload(t *testing.T) {
|
|||
{Content: utils.Ptr("record_1")},
|
||||
{Content: utils.Ptr("record_2")},
|
||||
},
|
||||
Ttl: utils.Ptr(int32(1)),
|
||||
Ttl: utils.Ptr(int64(1)),
|
||||
Type: utils.Ptr("type"),
|
||||
},
|
||||
true,
|
||||
|
|
@ -196,7 +196,7 @@ func TestToCreatePayload(t *testing.T) {
|
|||
Comment: nil,
|
||||
Name: utils.Ptr(""),
|
||||
Records: &[]dns.RecordPayload{},
|
||||
Ttl: utils.Ptr(int32(2123456789)),
|
||||
Ttl: utils.Ptr(int64(2123456789)),
|
||||
Type: utils.Ptr(""),
|
||||
},
|
||||
true,
|
||||
|
|
@ -260,7 +260,7 @@ func TestToUpdatePayload(t *testing.T) {
|
|||
{Content: utils.Ptr("record_1")},
|
||||
{Content: utils.Ptr("record_2")},
|
||||
},
|
||||
Ttl: utils.Ptr(int32(1)),
|
||||
Ttl: utils.Ptr(int64(1)),
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
|
@ -276,7 +276,7 @@ func TestToUpdatePayload(t *testing.T) {
|
|||
Comment: nil,
|
||||
Name: utils.Ptr(""),
|
||||
Records: &[]dns.RecordPayload{},
|
||||
Ttl: utils.Ptr(int32(2123456789)),
|
||||
Ttl: utils.Ptr(int64(2123456789)),
|
||||
},
|
||||
true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue