Remove unnecessary `.AnyTimes()` mock calls for unmanaged VPC test
@@ -538,90 +538,7 @@ func mockedCreateVPCCalls(m *mocks.MockEC2APIMockRecorder) {
Value: aws.String("1"),
},
},
- })).Return(&ec2.CreateTagsOutput{}, nil).AnyTimes()
- m.CreateTags(gomock.Eq(&ec2.CreateTagsInput{
- Resources: aws.StringSlice([]string{"subnet-2"}),
- Tags: []*ec2.Tag{
- {
- Key: aws.String("Name"),
- Value: aws.String("test-cluster-subnet-public-us-east-1c"),
- },
- {
- Key: aws.String("kubernetes.io/cluster/test-cluster"),
- Value: aws.String("shared"),
- },
- {
- Key: aws.String("kubernetes.io/role/internal-elb"),
- Value: aws.String("1"),
- },
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/cluster/test-cluster"),
- Value: aws.String("owned"),
- },
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/role"),
- Value: aws.String("public"),
- },
- },
- })).Return(&ec2.CreateTagsOutput{}, nil).AnyTimes()
- m.CreateSubnet(gomock.Eq(&ec2.CreateSubnetInput{
- VpcId: aws.String("vpc-exists"),
- CidrBlock: aws.String("10.0.11.0/24"),
- AvailabilityZone: aws.String("us-east-1c"),
- TagSpecifications: []*ec2.TagSpecification{
- {
- ResourceType: aws.String("subnet"),
- Tags: []*ec2.Tag{
- {
- Key: aws.String("Name"),
- Value: aws.String("test-cluster-subnet-public-us-east-1c"),
- },
- {
- Key: aws.String("kubernetes.io/cluster/test-cluster"),
- Value: aws.String("shared"),
- },
- {
- Key: aws.String("kubernetes.io/role/internal-elb"),
- Value: aws.String("1"),
- },
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/cluster/test-cluster"),
- Value: aws.String("owned"),
- },
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/role"),
- Value: aws.String("public"),
- },
- },
- },
- },
- })).Return(&ec2.CreateSubnetOutput{
- Subnet: &ec2.Subnet{
- VpcId: aws.String("vpc-exists"),
- SubnetId: aws.String("subnet-2"),
- CidrBlock: aws.String("10.0.11.0/24"),
- AvailabilityZone: aws.String("us-east-1c"),
- MapPublicIpOnLaunch: aws.Bool(false),
- Tags: []*ec2.Tag{
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/cluster/test-cluster"),
- Value: aws.String("owned"),
- },
- {
- Key: aws.String("sigs.k8s.io/cluster-api-provider-aws/role"),
- Value: aws.String("public"),
- },
- {
- Key: aws.String("Name"),
- Value: aws.String("test-cluster-subnet-public"),
- },
- {
- Key: aws.String("kubernetes.io/cluster/test-cluster"),
- Value: aws.String("shared"),
- },
- },
- },
- }, nil).AnyTimes()
+ })).Return(&ec2.CreateTagsOutput{}, nil)
m.DescribeSubnets(gomock.Eq(&ec2.DescribeSubnetsInput{
Filters: []*ec2.Filter{
{
