fix(deps): update stackit sdk modules (#846)
* fix(deps): update stackit sdk modules * feat: Use new generated enums Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
parent
5d844a84d6
commit
7ce802769c
33 changed files with 222 additions and 225 deletions
|
|
@ -452,7 +452,7 @@ func mapFields(distribution *cdn.Distribution, model *Model) error {
|
|||
model.ID = types.StringValue(id)
|
||||
model.DistributionId = types.StringValue(*distribution.Id)
|
||||
model.ProjectId = types.StringValue(*distribution.ProjectId)
|
||||
model.Status = types.StringValue(*distribution.Status)
|
||||
model.Status = types.StringValue(string(distribution.GetStatus()))
|
||||
model.CreatedAt = types.StringValue(distribution.CreatedAt.String())
|
||||
model.UpdatedAt = types.StringValue(distribution.UpdatedAt.String())
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ func mapFields(distribution *cdn.Distribution, model *Model) error {
|
|||
modelDomain, diags := types.ObjectValue(domainTypes, map[string]attr.Value{
|
||||
"name": types.StringValue(*d.Name),
|
||||
"status": types.StringValue(string(*d.Status)),
|
||||
"type": types.StringValue(*d.Type),
|
||||
"type": types.StringValue(string(*d.Type)),
|
||||
"errors": modelDomainErrors,
|
||||
})
|
||||
if diags.HasError() {
|
||||
|
|
|
|||
|
|
@ -236,12 +236,12 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
Name: cdn.PtrString("test.stackit-cdn.com"),
|
||||
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
|
||||
Type: cdn.PtrString("managed"),
|
||||
Type: cdn.DOMAINTYPE_MANAGED.Ptr(),
|
||||
},
|
||||
},
|
||||
Id: cdn.PtrString("test-distribution-id"),
|
||||
ProjectId: cdn.PtrString("test-project-id"),
|
||||
Status: cdn.PtrString("ACTIVE"),
|
||||
Status: cdn.DISTRIBUTIONSTATUS_ACTIVE.Ptr(),
|
||||
UpdatedAt: &updatedAt,
|
||||
}
|
||||
for _, mod := range mods {
|
||||
|
|
@ -264,7 +264,7 @@ func TestMapFields(t *testing.T) {
|
|||
m.Status = types.StringValue("ERROR")
|
||||
}),
|
||||
Input: distributionFixture(func(d *cdn.Distribution) {
|
||||
d.Status = cdn.PtrString("ERROR")
|
||||
d.Status = cdn.DISTRIBUTIONSTATUS_ERROR.Ptr()
|
||||
}),
|
||||
IsValid: true,
|
||||
},
|
||||
|
|
@ -290,12 +290,12 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
Name: cdn.PtrString("test.stackit-cdn.com"),
|
||||
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
|
||||
Type: cdn.PtrString("managed"),
|
||||
Type: cdn.DOMAINTYPE_MANAGED.Ptr(),
|
||||
},
|
||||
{
|
||||
Name: cdn.PtrString("mycoolapp.info"),
|
||||
Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(),
|
||||
Type: cdn.PtrString("custom"),
|
||||
Type: cdn.DOMAINTYPE_CUSTOM.Ptr(),
|
||||
},
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue