Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tinnywang committed Dec 6, 2024
1 parent 8a02e62 commit 013654d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 013654d

Please sign in to comment.