From 013654d9b7ebd65e5411282a671dbcc55ba1cbd6 Mon Sep 17 00:00:00 2001 From: Tiffany Wang Date: Mon, 2 Dec 2024 13:38:45 -0800 Subject: [PATCH] fix test --- agent/config/config_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/config/config_test.go b/agent/config/config_test.go index 4d0ee41ceea..d2e671dcc13 100644 --- a/agent/config/config_test.go +++ b/agent/config/config_test.go @@ -28,8 +28,8 @@ import ( "github.com/aws/amazon-ecs-agent/agent/utils" "github.com/aws/amazon-ecs-agent/ecs-agent/ec2" mock_ec2 "github.com/aws/amazon-ecs-agent/ecs-agent/ec2/mocks" + "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -76,7 +76,7 @@ func TestBooleanMergeNotSetOverridden(t *testing.T) { func TestBrokenEC2Metadata(t *testing.T) { ctrl := gomock.NewController(t) mockEc2Metadata := mock_ec2.NewMockEC2MetadataClient(ctrl) - mockEc2Metadata.EXPECT().InstanceIdentityDocument().Return(ec2metadata.EC2InstanceIdentityDocument{}, errors.New("err")) + mockEc2Metadata.EXPECT().InstanceIdentityDocument().Return(imds.InstanceIdentityDocument{}, errors.New("err")) mockEc2Metadata.EXPECT().GetUserData() _, err := NewConfig(mockEc2Metadata)