fix(tests): remove aws error assertions

Signed-off-by: Mike Nguyen <hey@mike.ee>
This commit is contained in:
Mike Nguyen 2025-05-19 11:46:31 +01:00
parent 63e7a4a35e
commit c9ece74992
No known key found for this signature in database
GPG Key ID: ACED13988580D50E
1 changed files with 1 additions and 16 deletions

View File

@ -20,7 +20,6 @@ import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/aws/aws-sdk-go/service/sns/snsiface"
@ -166,22 +165,8 @@ func sqsService() *sqs.SQS {
func getIdentity(svc stsiface.STSAPI) (*sts.GetCallerIdentityOutput, error) {
input := &sts.GetCallerIdentityInput{}
result, err := svc.GetCallerIdentity(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
default:
return nil, fmt.Errorf(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
return nil, fmt.Errorf(aerr.Error())
}
return nil, err
}
return result, nil
return svc.GetCallerIdentity(input)
}
func buildARN(partition, serviceName, entityName, region string, id *sts.GetCallerIdentityOutput) string {