diff --git a/go.mod b/go.mod index a05f8731313..773545d9024 100644 --- a/go.mod +++ b/go.mod @@ -11,16 +11,16 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20230601180523-74e721cb8c1e github.com/aws/aws-sdk-go v1.51.16 - github.com/aws/aws-sdk-go-v2 v1.27.1 + github.com/aws/aws-sdk-go-v2 v1.30.0 github.com/aws/aws-sdk-go-v2/config v1.27.11 github.com/aws/aws-sdk-go-v2/credentials v1.17.11 github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5 - github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0 + github.com/aws/aws-sdk-go-v2/service/cloudformation v1.52.1 github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2 github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.35.1 github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.36.3 github.com/aws/aws-sdk-go-v2/service/ec2 v1.156.0 - github.com/aws/aws-sdk-go-v2/service/eks v1.43.0 + github.com/aws/aws-sdk-go-v2/service/eks v1.44.1 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.30.5 github.com/aws/aws-sdk-go-v2/service/iam v1.32.0 @@ -127,8 +127,8 @@ require ( github.com/atotto/clipboard v0.1.4 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect diff --git a/go.sum b/go.sum index 21aaa458311..22dfaff7fe7 100644 --- a/go.sum +++ b/go.sum @@ -716,8 +716,8 @@ github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20230601180523-74e721cb8 github.com/aws/aws-sdk-go v1.51.16 h1:vnWKK8KjbftEkuPX8bRj3WHsLy1uhotn0eXptpvrxJI= github.com/aws/aws-sdk-go v1.51.16/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.16.15/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k= -github.com/aws/aws-sdk-go-v2 v1.27.1 h1:xypCL2owhog46iFxBKKpBcw+bPTX/RJzwNj8uSilENw= -github.com/aws/aws-sdk-go-v2 v1.27.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= +github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= @@ -727,17 +727,17 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.22/go.mod h1:/vNv5Al0bpiF8YdX2Ov6Xy05VTiXsql94yUqJMYaj0w= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8 h1:RnLB7p6aaFMRfyQkD6ckxR7myCC9SABIqSz4czYUUbU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8/go.mod h1:XH7dQJd+56wEbP1I4e4Duo+QhSMxNArE8VP7NuUOTeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.16/go.mod h1:62dsXI0BqTIGomDl8Hpm33dv0OntGaVblri3ZRParVQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8 h1:jzApk2f58L9yW9q1GEab3BMMFWUkkiZhyrRUtbwUbKU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8/go.mod h1:WqO+FftfO3tGePUtQxPXM6iODVfqMwsVMgTbG/ZXIdQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5 h1:vhdJymxlWS2qftzLiuCjSswjXBRLGfzo/BEE9LDveBA= github.com/aws/aws-sdk-go-v2/service/autoscaling v1.40.5/go.mod h1:ZErgk/bPaaZIpj+lUWGlwI1A0UFhSIscgnCPzTLnb2s= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0 h1:Ap5tOJfeAH1hO2UQc3X3uMlwP7uryFeZXMvZCXIlLSE= -github.com/aws/aws-sdk-go-v2/service/cloudformation v1.50.0/go.mod h1:/v2KYdCW4BaHKayenaWEXOOdxItIwEA3oU0XzuQY3F0= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.52.1 h1:Ts+mCjOtt8o2k2vnWnX/0sE0eSmEVWBvfJkNrNMQlAo= +github.com/aws/aws-sdk-go-v2/service/cloudformation v1.52.1/go.mod h1:IrWhabzdTEc651GAq7rgst/SYcEqqcD7Avr82m28AAU= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2 h1:svl3DNKWpcLOlz+bFzmOxGp8gcbvSZ6m2t44Zzaet9U= github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.39.2/go.mod h1:gAJs+mKIoK4JTQD1KMZtHgyBRZ8S6Oy5+qjJzoDAvbE= github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.35.1 h1:suWu59CRsDNhw2YXPpa6drYEetIUUIMUhkzHmucbCf8= @@ -746,8 +746,8 @@ github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.36.3 h1:JNWpkjIm github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.36.3/go.mod h1:TiLZ2/+WAEyG2PnuAYj/un46UJ7qBf5BWWTAKgaHP8I= github.com/aws/aws-sdk-go-v2/service/ec2 v1.156.0 h1:TFK9GeUINErClL2+A+GLYhjiChVdaXCgIUiCsS/UQrE= github.com/aws/aws-sdk-go-v2/service/ec2 v1.156.0/go.mod h1:xejKuuRDjz6z5OqyeLsz01MlOqqW7CqpAB4PabNvpu8= -github.com/aws/aws-sdk-go-v2/service/eks v1.43.0 h1:TRgA51vdnrXiZpCab7pQT0bF52rX5idH0/fzrIVnQS0= -github.com/aws/aws-sdk-go-v2/service/eks v1.43.0/go.mod h1:875ZmajQCZ9N7HeR1DE25nTSaalkqGYzQa+BxLattlQ= +github.com/aws/aws-sdk-go-v2/service/eks v1.44.1 h1:onUAzZXDsyXzyrmOGw/9p8Csl1NZkTDEs4URZ8covUY= +github.com/aws/aws-sdk-go-v2/service/eks v1.44.1/go.mod h1:dg9l/W4hXygeRNydRB4LWKY/MwHJhfUomGJUBwI29Dw= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4 h1:V5YvSMQwZklktzYeOOhYdptx7rP650XP3RnxwNu1UEQ= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.24.4/go.mod h1:aYygRYqRxmLGrxRxAisgNarwo4x8bcJG14rh4r57VqE= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.30.5 h1:/x2u/TOx+n17U+gz98TOw1HKJom0EOqrhL4SjrHr0cQ= diff --git a/pkg/actions/cluster/get_test.go b/pkg/actions/cluster/get_test.go index d015bb5c0e3..fe8c908703a 100644 --- a/pkg/actions/cluster/get_test.go +++ b/pkg/actions/cluster/get_test.go @@ -49,7 +49,7 @@ var _ = Describe("Get", func() { intialProvider.MockEKS().On("ListClusters", mock.Anything, &awseks.ListClustersInput{ MaxResults: aws.Int32(100), Include: []string{"all"}, - }).Return(&awseks.ListClustersOutput{ + }, mock.Anything).Return(&awseks.ListClustersOutput{ Clusters: []string{"cluster1", "cluster2", "cluster3"}, }, nil) @@ -110,7 +110,7 @@ var _ = Describe("Get", func() { intialProvider.MockEKS().On("ListClusters", mock.Anything, &awseks.ListClustersInput{ MaxResults: aws.Int32(100), Include: []string{"all"}, - }).Return(nil, fmt.Errorf("foo")) + }, mock.Anything).Return(nil, fmt.Errorf("foo")) }) It("errors", func() { @@ -158,14 +158,14 @@ var _ = Describe("Get", func() { providerRegion1.MockEKS().On("ListClusters", mock.Anything, &awseks.ListClustersInput{ MaxResults: aws.Int32(100), Include: []string{"all"}, - }).Return(&awseks.ListClustersOutput{ + }, mock.Anything).Return(&awseks.ListClustersOutput{ Clusters: []string{"cluster1"}, }, nil) providerRegion2.MockEKS().On("ListClusters", mock.Anything, &awseks.ListClustersInput{ MaxResults: aws.Int32(100), Include: []string{"all"}, - }).Return(&awseks.ListClustersOutput{ + }, mock.Anything).Return(&awseks.ListClustersOutput{ Clusters: []string{"cluster2"}, }, nil) @@ -242,7 +242,7 @@ var _ = Describe("Get", func() { providerRegion1.MockEKS().On("ListClusters", mock.Anything, &awseks.ListClustersInput{ MaxResults: aws.Int32(100), Include: []string{"all"}, - }).Return(&awseks.ListClustersOutput{ + }, mock.Anything).Return(&awseks.ListClustersOutput{ Clusters: []string{"cluster1"}, }, nil) diff --git a/pkg/actions/nodegroup/create_test.go b/pkg/actions/nodegroup/create_test.go index 0d511089d7e..c16a8e9c7fc 100644 --- a/pkg/actions/nodegroup/create_test.go +++ b/pkg/actions/nodegroup/create_test.go @@ -168,7 +168,7 @@ var _ = DescribeTable("Create", func(t ngEntry) { mockCalls: func(m mockCalls) { m.kubeProvider.NewRawClientReturns(&kubernetes.RawClient{}, nil) m.kubeProvider.ServerVersionReturns("1.17", nil) - m.mockProvider.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + m.mockProvider.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cftypes.StackSummary{ { StackName: aws.String("eksctl-my-cluster-cluster"), @@ -854,7 +854,7 @@ func mockProviderWithVPCSubnets(p *mockprovider.MockProvider, subnets *vpcSubnet } func mockProviderWithConfig(p *mockprovider.MockProvider, describeStacksOutput []cftypes.Output, subnets *vpcSubnets, vpcConfigRes *ekstypes.VpcConfigResponse, outpostConfig *ekstypes.OutpostConfigResponse, accessConfig *ekstypes.AccessConfigResponse) { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cftypes.StackSummary{ { StackName: aws.String("eksctl-my-cluster-cluster"), @@ -1021,7 +1021,7 @@ func mockProviderWithConfig(p *mockprovider.MockProvider, describeStacksOutput [ func mockProviderForUnownedCluster(p *mockprovider.MockProvider, k *eksfakes.FakeKubeProvider, extraSGRules ...ec2types.SecurityGroupRule) { k.NewRawClientReturns(&kubernetes.RawClient{}, nil) k.ServerVersionReturns("1.27", nil) - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cftypes.StackSummary{ { StackName: aws.String("eksctl-my-cluster-cluster"), diff --git a/pkg/actions/podidentityassociation/addon_migrator_test.go b/pkg/actions/podidentityassociation/addon_migrator_test.go index 7bb1fbe7a34..d797fe2c7a6 100644 --- a/pkg/actions/podidentityassociation/addon_migrator_test.go +++ b/pkg/actions/podidentityassociation/addon_migrator_test.go @@ -46,7 +46,7 @@ var _ = Describe("Addon Migration", func() { mockAddonCalls := func(eksAddonsAPI *mocksv2.EKS) { eksAddonsAPI.On("ListAddons", mock.Anything, &eks.ListAddonsInput{ ClusterName: aws.String(clusterName), - }).Return(&eks.ListAddonsOutput{ + }, mock.Anything).Return(&eks.ListAddonsOutput{ Addons: []string{"vpc-cni"}, }, nil) eksAddonsAPI.On("DescribeAddon", mock.Anything, &eks.DescribeAddonInput{ diff --git a/pkg/actions/podidentityassociation/migrator_test.go b/pkg/actions/podidentityassociation/migrator_test.go index bb54a7a095c..b1adf80e7a6 100644 --- a/pkg/actions/podidentityassociation/migrator_test.go +++ b/pkg/actions/podidentityassociation/migrator_test.go @@ -96,7 +96,7 @@ var _ = Describe("Create", func() { mockProvider = mockprovider.NewMockProvider() mockProvider.MockEKS().On("ListAddons", mock.Anything, &awseks.ListAddonsInput{ ClusterName: aws.String(clusterName), - }).Return(&awseks.ListAddonsOutput{}, nil) + }, mock.Anything).Return(&awseks.ListAddonsOutput{}, nil) if e.mockEKS != nil { e.mockEKS(mockProvider) } diff --git a/pkg/cfn/manager/api_test.go b/pkg/cfn/manager/api_test.go index cf650271a3c..d6e3b6d574e 100644 --- a/pkg/cfn/manager/api_test.go +++ b/pkg/cfn/manager/api_test.go @@ -403,7 +403,7 @@ var _ = Describe("StackCollection", func() { }) It("can retrieve stacks", func() { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cfn.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cfn.ListStacksOutput{ StackSummaries: []types.StackSummary{ { StackName: &stackNameWithEksctl, @@ -418,7 +418,7 @@ var _ = Describe("StackCollection", func() { When("the config stack doesn't match", func() { It("returns no stack", func() { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cfn.ListStacksOutput{}, nil) + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cfn.ListStacksOutput{}, nil) cfg.Metadata.Name = "not-this" sm := NewStackCollection(p, cfg) stack, err := sm.GetClusterStackIfExists(context.Background()) @@ -429,7 +429,7 @@ var _ = Describe("StackCollection", func() { When("ListStacks errors", func() { It("errors", func() { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(nil, errors.New("nope")) + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("nope")) sm := NewStackCollection(p, cfg) _, err := sm.GetClusterStackIfExists(context.Background()) Expect(err).To(MatchError(ContainSubstring("nope"))) diff --git a/pkg/cfn/manager/tasks_test.go b/pkg/cfn/manager/tasks_test.go index ea81694ae84..b840fe9d390 100644 --- a/pkg/cfn/manager/tasks_test.go +++ b/pkg/cfn/manager/tasks_test.go @@ -82,7 +82,7 @@ var _ = Describe("StackCollection Tasks", func() { { tasks := stackManager.NewUnmanagedNodeGroupTask(context.Background(), makeNodeGroups("bar", "foo"), false, false, true, fakeVPCImporter) Expect(tasks.Describe()).To(Equal(` -2 parallel tasks: { create nodegroup "bar", create nodegroup "foo" +2 parallel tasks: { create nodegroup "bar", create nodegroup "foo" } `)) } @@ -105,18 +105,18 @@ var _ = Describe("StackCollection Tasks", func() { { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("bar", "foo"), nil, accessConfig, nil) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", - 2 parallel sub-tasks: { +2 sequential tasks: { create cluster control plane "test-cluster", + 2 parallel sub-tasks: { create nodegroup "bar", create nodegroup "foo", - } + } } `)) } { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("bar"), nil, accessConfig, nil) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", create nodegroup "bar" +2 sequential tasks: { create cluster control plane "test-cluster", create nodegroup "bar" } `)) } @@ -127,62 +127,62 @@ var _ = Describe("StackCollection Tasks", func() { { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("bar", "foo"), makeManagedNodeGroups("m1", "m2"), accessConfig, nil) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", - 2 parallel sub-tasks: { - 2 parallel sub-tasks: { +2 sequential tasks: { create cluster control plane "test-cluster", + 2 parallel sub-tasks: { + 2 parallel sub-tasks: { create nodegroup "bar", create nodegroup "foo", }, - 2 parallel sub-tasks: { + 2 parallel sub-tasks: { create managed nodegroup "m1", create managed nodegroup "m2", }, - } + } } `)) } { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("bar", "foo"), makeManagedNodeGroupsWithPropagatedTags("m1", "m2"), accessConfig, nil) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", - 2 parallel sub-tasks: { - 2 parallel sub-tasks: { +2 sequential tasks: { create cluster control plane "test-cluster", + 2 parallel sub-tasks: { + 2 parallel sub-tasks: { create nodegroup "bar", create nodegroup "foo", }, - 2 parallel sub-tasks: { - 2 sequential sub-tasks: { + 2 parallel sub-tasks: { + 2 sequential sub-tasks: { create managed nodegroup "m1", propagate tags to ASG for managed nodegroup "m1", }, - 2 sequential sub-tasks: { + 2 sequential sub-tasks: { create managed nodegroup "m2", propagate tags to ASG for managed nodegroup "m2", }, }, - } + } } `)) } { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("foo"), makeManagedNodeGroups("m1"), accessConfig, nil) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", - 2 parallel sub-tasks: { +2 sequential tasks: { create cluster control plane "test-cluster", + 2 parallel sub-tasks: { create nodegroup "foo", create managed nodegroup "m1", - } + } } `)) } { tasks := stackManager.NewTasksToCreateCluster(context.Background(), makeNodeGroups("bar"), nil, accessConfig, nil, &task{id: 1}) Expect(tasks.Describe()).To(Equal(` -2 sequential tasks: { create cluster control plane "test-cluster", - 2 sequential sub-tasks: { +2 sequential tasks: { create cluster control plane "test-cluster", + 2 sequential sub-tasks: { task 1, create nodegroup "bar", - } + } } `)) } @@ -203,7 +203,7 @@ var _ = Describe("StackCollection Tasks", func() { stackManager = NewStackCollection(p, cfg) }) It("returns an error", func() { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{}, nil) + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{}, nil) ng := api.NewManagedNodeGroup() fakeVPCImporter := new(vpcfakes.FakeImporter) tasks := stackManager.NewManagedNodeGroupTask(context.Background(), []*api.ManagedNodeGroup{ng}, false, fakeVPCImporter) @@ -213,7 +213,7 @@ var _ = Describe("StackCollection Tasks", func() { }) When("finding the stack fails", func() { It("returns the stack error", func() { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(nil, errors.New("not found")) + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("not found")) ng := api.NewManagedNodeGroup() fakeVPCImporter := new(vpcfakes.FakeImporter) tasks := stackManager.NewManagedNodeGroupTask(context.Background(), []*api.ManagedNodeGroup{ng}, false, fakeVPCImporter) @@ -253,7 +253,7 @@ var _ = Describe("StackCollection Tasks", func() { }, Entry("an OIDC provider is associated with the cluster", oidcEntry{ mockProvider: func(p *mockprovider.MockProvider) { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cfntypes.StackSummary{}, }, nil) }, @@ -268,7 +268,7 @@ var _ = Describe("StackCollection Tasks", func() { Entry("cluster has IAM service accounts", oidcEntry{ mockProvider: func(p *mockprovider.MockProvider) { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cfntypes.StackSummary{ { StackName: aws.String("eksctl-test-cluster-addon-iamserviceaccount-test"), @@ -298,7 +298,7 @@ var _ = Describe("StackCollection Tasks", func() { Entry("OIDC provider and service accounts do not exist for the cluster", oidcEntry{ mockProvider: func(p *mockprovider.MockProvider) { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cfntypes.StackSummary{}, }, nil) }, @@ -309,7 +309,7 @@ var _ = Describe("StackCollection Tasks", func() { Entry("OIDC provider definitely does not exist for the cluster", oidcEntry{ mockProvider: func(p *mockprovider.MockProvider) { - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cfntypes.StackSummary{}, }, nil) }, diff --git a/pkg/ctl/create/cluster_test.go b/pkg/ctl/create/cluster_test.go index 4c2d3887718..9b8a9311bbe 100644 --- a/pkg/ctl/create/cluster_test.go +++ b/pkg/ctl/create/cluster_test.go @@ -951,7 +951,7 @@ func defaultProviderMocks(p *mockprovider.MockProvider, output []cftypes.Output, ZoneId: aws.String("id"), }}, }, nil) - p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ + p.MockCloudFormation().On("ListStacks", mock.Anything, mock.Anything, mock.Anything).Return(&cloudformation.ListStacksOutput{ StackSummaries: []cftypes.StackSummary{ { StackName: aws.String(clusterStackName), @@ -1075,7 +1075,7 @@ func mockOutposts(provider *mockprovider.MockProvider, outpostID string) { }, nil) provider.MockOutposts().On("GetOutpostInstanceTypes", mock.Anything, &outposts.GetOutpostInstanceTypesInput{ OutpostId: aws.String(outpostID), - }).Return(&outposts.GetOutpostInstanceTypesOutput{ + }, mock.Anything).Return(&outposts.GetOutpostInstanceTypesOutput{ InstanceTypes: []outpoststypes.InstanceTypeItem{ { InstanceType: aws.String("m5.xlarge"), diff --git a/pkg/eks/eks_test.go b/pkg/eks/eks_test.go index 02a4d4d6b1d..173a7403259 100644 --- a/pkg/eks/eks_test.go +++ b/pkg/eks/eks_test.go @@ -110,7 +110,7 @@ var _ = Describe("EKS API wrapper", func() { } } return matches == len(expectedStatusFilter) - })).Return(&cfn.ListStacksOutput{}, nil) + }), mock.Anything).Return(&cfn.ListStacksOutput{}, nil) }) JustBeforeEach(func() { diff --git a/pkg/eks/nodegroup_service_test.go b/pkg/eks/nodegroup_service_test.go index eaed9b0b2c0..54a3ffd9fb5 100644 --- a/pkg/eks/nodegroup_service_test.go +++ b/pkg/eks/nodegroup_service_test.go @@ -326,7 +326,7 @@ func mockOutpostInstanceTypes(provider *mockprovider.MockProvider) { instanceTypes[i] = it.InstanceType } - provider.MockOutposts().On("GetOutpostInstanceTypes", mock.Anything, mock.Anything).Return(&awsoutposts.GetOutpostInstanceTypesOutput{ + provider.MockOutposts().On("GetOutpostInstanceTypes", mock.Anything, mock.Anything, mock.Anything).Return(&awsoutposts.GetOutpostInstanceTypesOutput{ InstanceTypes: instanceTypeItems, }, nil) diff --git a/pkg/outposts/outposts_test.go b/pkg/outposts/outposts_test.go index e72cc368d40..410b8f329a7 100644 --- a/pkg/outposts/outposts_test.go +++ b/pkg/outposts/outposts_test.go @@ -229,7 +229,7 @@ func mockOutpostInstanceTypes(provider *mockprovider.MockProvider) { } instanceTypes[i] = it.InstanceType } - provider.MockOutposts().On("GetOutpostInstanceTypes", mock.Anything, mock.Anything).Return(&awsoutposts.GetOutpostInstanceTypesOutput{ + provider.MockOutposts().On("GetOutpostInstanceTypes", mock.Anything, mock.Anything, mock.Anything).Return(&awsoutposts.GetOutpostInstanceTypesOutput{ InstanceTypes: instanceTypeItems, }, nil)