Skip to content

Commit 3809c48

Browse files
authored
aws/ec2metadata: fixup service test (#129)
Fixes the unit test for ec2metadata. The tests used imports from v1.
1 parent c1507f5 commit 3809c48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws/ec2metadata/service_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import (
55
"strings"
66
"testing"
77

8+
"github.com/aws/aws-sdk-go-v2/aws"
89
"github.com/aws/aws-sdk-go-v2/aws/awserr"
910
"github.com/aws/aws-sdk-go-v2/aws/ec2metadata"
11+
"github.com/aws/aws-sdk-go-v2/internal/awstesting"
1012
"github.com/aws/aws-sdk-go-v2/internal/awstesting/unit"
11-
"github.com/aws/aws-sdk-go/aws/request"
12-
"github.com/aws/aws-sdk-go/awstesting"
1313
)
1414

1515
func TestClientDisableIMDS(t *testing.T) {
@@ -28,7 +28,7 @@ func TestClientDisableIMDS(t *testing.T) {
2828
}
2929

3030
aerr := err.(awserr.Error)
31-
if e, a := request.CanceledErrorCode, aerr.Code(); e != a {
31+
if e, a := aws.CanceledErrorCode, aerr.Code(); e != a {
3232
t.Errorf("expect %v error code, got %v", e, a)
3333
}
3434
if e, a := "AWS_EC2_METADATA_DISABLED", aerr.Message(); !strings.Contains(a, e) {

0 commit comments

Comments
 (0)