11package object_test
22
33import (
4+ s3Types "github.com/aws/aws-sdk-go-v2/service/s3/types"
5+ "github.com/scaleway/terraform-provider-scaleway/v2/internal/types"
46 "testing"
57
6- "github.com/aws/aws-sdk-go/service/s3"
78 "github.com/scaleway/scaleway-sdk-go/scw"
89 "github.com/scaleway/terraform-provider-scaleway/v2/internal/services/object"
910 "github.com/stretchr/testify/assert"
@@ -18,20 +19,20 @@ func TestExpandObjectBucketTags(t *testing.T) {
1819 tests := []struct {
1920 name string
2021 tags interface {}
21- want []* s3 .Tag
22+ want []s3Types .Tag
2223 }{
2324 {
2425 name : "no tags" ,
2526 tags : map [string ]interface {}{},
26- want : []* s3 .Tag (nil ),
27+ want : []s3Types .Tag (nil ),
2728 },
2829 {
2930 name : "single tag" ,
3031 tags : map [string ]interface {}{
3132 "key1" : "val1" ,
3233 },
33- want : []* s3 .Tag {
34- {Key : scw .StringPtr ("key1" ), Value : scw . StringPtr ("val1" )},
34+ want : []s3Types .Tag {
35+ {Key : scw .StringPtr ("key1" ), Value : types . ExpandStringPtr ("val1" )},
3536 },
3637 },
3738 {
@@ -41,10 +42,10 @@ func TestExpandObjectBucketTags(t *testing.T) {
4142 "key2" : "val2" ,
4243 "key3" : "val3" ,
4344 },
44- want : []* s3 .Tag {
45- {Key : scw .StringPtr ("key1" ), Value : scw . StringPtr ("val1" )},
46- {Key : scw .StringPtr ("key2" ), Value : scw . StringPtr ("val2" )},
47- {Key : scw .StringPtr ("key3" ), Value : scw . StringPtr ("val3" )},
45+ want : []s3Types .Tag {
46+ {Key : scw .StringPtr ("key1" ), Value : types . ExpandStringPtr ("val1" )},
47+ {Key : scw .StringPtr ("key2" ), Value : types . ExpandStringPtr ("val2" )},
48+ {Key : scw .StringPtr ("key3" ), Value : types . ExpandStringPtr ("val3" )},
4849 },
4950 },
5051 }
0 commit comments