Skip to content

Commit 113e11f

Browse files
authored
test(instance): fix TestAccScalewayInstanceServer_AlterTags (#716)
1 parent f775393 commit 113e11f

File tree

3 files changed

+1013
-1018
lines changed

3 files changed

+1013
-1018
lines changed

scaleway/helpers.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,7 @@ func expandStringWithDefault(data interface{}, defaultValue string) string {
374374
}
375375

376376
func expandStrings(data interface{}) []string {
377-
if data == nil {
378-
return []string{}
379-
}
380-
stringSlice := []string(nil)
377+
stringSlice := []string{}
381378
for _, s := range data.([]interface{}) {
382379
stringSlice = append(stringSlice, s.(string))
383380
}

scaleway/resource_instance_server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,7 @@ func resourceScalewayInstanceServerUpdate(ctx context.Context, d *schema.Resourc
510510
}
511511

512512
if d.HasChange("tags") {
513-
tags := expandStrings(d.Get("tags"))
514-
updateRequest.Tags = scw.StringsPtr(tags)
513+
updateRequest.Tags = scw.StringsPtr(expandStrings(d.Get("tags")))
515514
}
516515

517516
if d.HasChange("security_group_id") {

0 commit comments

Comments
 (0)