Skip to content

Commit c9ece74

Browse files
committed
fix(tests): remove aws error assertions
Signed-off-by: Mike Nguyen <[email protected]>
1 parent 63e7a4a commit c9ece74

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

tests/certification/pubsub/aws/snssqs/snssqs_helper.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"fmt"
2121

2222
"github.com/aws/aws-sdk-go/aws"
23-
"github.com/aws/aws-sdk-go/aws/awserr"
2423
"github.com/aws/aws-sdk-go/aws/session"
2524
"github.com/aws/aws-sdk-go/service/sns"
2625
"github.com/aws/aws-sdk-go/service/sns/snsiface"
@@ -166,22 +165,8 @@ func sqsService() *sqs.SQS {
166165

167166
func getIdentity(svc stsiface.STSAPI) (*sts.GetCallerIdentityOutput, error) {
168167
input := &sts.GetCallerIdentityInput{}
169-
result, err := svc.GetCallerIdentity(input)
170-
if err != nil {
171-
if aerr, ok := err.(awserr.Error); ok {
172-
switch aerr.Code() {
173-
default:
174-
return nil, fmt.Errorf(aerr.Error())
175-
}
176-
} else {
177-
// Print the error, cast err to awserr.Error to get the Code and
178-
// Message from an error.
179-
return nil, fmt.Errorf(aerr.Error())
180-
}
181-
return nil, err
182-
}
183168

184-
return result, nil
169+
return svc.GetCallerIdentity(input)
185170
}
186171

187172
func buildARN(partition, serviceName, entityName, region string, id *sts.GetCallerIdentityOutput) string {

0 commit comments

Comments
 (0)