Skip to content

Commit a2e0f5a

Browse files
committed
test(cloudcontrol): rename function, use lister
1 parent 3495fcc commit a2e0f5a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

resources/cloudcontrol_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestCloudControlParseProperties(t *testing.T) {
1616
want []string
1717
}{
1818
{
19-
name: "ActualEC2VPC",
19+
name: "AWS::EC2::VPC",
2020
payload: `{"VpcId":"vpc-456","InstanceTenancy":"default","CidrBlockAssociations":["vpc-cidr-assoc-1234", "vpc-cidr-assoc-5678"],"CidrBlock":"10.10.0.0/16","Tags":[{"Value":"Kubernetes VPC","Key":"Name"}]}`, //nolint:lll
2121
want: []string{
2222
`CidrBlock: "10.10.0.0/16"`,
@@ -31,7 +31,11 @@ func TestCloudControlParseProperties(t *testing.T) {
3131

3232
for _, tc := range cases {
3333
t.Run(tc.name, func(t *testing.T) {
34-
result, err := cloudControlParseProperties(tc.payload)
34+
lister := CloudControlResourceLister{
35+
TypeName: tc.name,
36+
}
37+
38+
result, err := lister.cloudControlParseProperties(tc.payload)
3539
assert.NoError(t, err)
3640
for _, w := range tc.want {
3741
assert.Contains(t, result.String(), w)

0 commit comments

Comments
 (0)