Skip to content

Commit 39f088b

Browse files
committed
Remove multi-az e2e test (it is no longer supported)
1 parent 342dd42 commit 39f088b

File tree

6 files changed

+0
-99
lines changed

6 files changed

+0
-99
lines changed

test/e2e/data/e2e_conf.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ providers:
105105
- sourcePath: "./infrastructure-aws/generated/cluster-template-limit-az.yaml"
106106
- sourcePath: "./infrastructure-aws/generated/cluster-template-machine-pool.yaml"
107107
- sourcePath: "./infrastructure-aws/generated/cluster-template-md-remediation.yaml"
108-
- sourcePath: "./infrastructure-aws/generated/cluster-template-multi-az.yaml"
109108
- sourcePath: "./infrastructure-aws/generated/cluster-template-nested-multitenancy.yaml"
110109
- sourcePath: "./infrastructure-aws/generated/cluster-template-remote-management-cluster.yaml"
111110
- sourcePath: "./infrastructure-aws/generated/cluster-template-simple-multitenancy.yaml"

test/e2e/data/infrastructure-aws/kustomize_sources/multi-az/kustomization.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/e2e/data/infrastructure-aws/kustomize_sources/multi-az/patches/multi-az.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/e2e/shared/defaults.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const (
4949
AwsNodeMachineType = "AWS_NODE_MACHINE_TYPE"
5050
AwsAvailabilityZone1 = "AWS_AVAILABILITY_ZONE_1"
5151
AwsAvailabilityZone2 = "AWS_AVAILABILITY_ZONE_2"
52-
MultiAzFlavor = "multi-az"
5352
LimitAzFlavor = "limit-az"
5453
SpotInstancesFlavor = "spot-instances"
5554
SSMFlavor = "ssm"

test/e2e/suites/unmanaged/helpers_test.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -388,35 +388,6 @@ func getEvents(namespace string) *corev1.EventList {
388388
return eventsList
389389
}
390390

391-
func getSubnetID(filterKey, filterValue, clusterName string) *string {
392-
var subnetOutput *ec2.DescribeSubnetsOutput
393-
var err error
394-
395-
ec2Client := ec2.New(e2eCtx.AWSSession)
396-
subnetInput := &ec2.DescribeSubnetsInput{
397-
Filters: []*ec2.Filter{
398-
{
399-
Name: aws.String(filterKey),
400-
Values: []*string{
401-
aws.String(filterValue),
402-
},
403-
},
404-
{
405-
Name: aws.String("tag-key"),
406-
Values: aws.StringSlice([]string{"sigs.k8s.io/cluster-api-provider-aws/cluster/" + clusterName}),
407-
},
408-
},
409-
}
410-
411-
Eventually(func() int {
412-
subnetOutput, err = ec2Client.DescribeSubnets(subnetInput)
413-
Expect(err).NotTo(HaveOccurred())
414-
return len(subnetOutput.Subnets)
415-
}, e2eCtx.E2EConfig.GetIntervals("", "wait-infra-subnets")...).Should(Equal(1))
416-
417-
return subnetOutput.Subnets[0].SubnetId
418-
}
419-
420391
func getVolumeIds(info statefulSetInfo, k8sclient crclient.Client) []*string {
421392
ginkgo.By("Retrieving IDs of dynamically provisioned volumes.")
422393
statefulset := &appsv1.StatefulSet{}

test/e2e/suites/unmanaged/unmanaged_functional_test.go

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ package unmanaged
2222
import (
2323
"context"
2424
"fmt"
25-
"os"
2625
"path/filepath"
2726
"strings"
2827
"time"
@@ -547,51 +546,6 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
547546
})
548547
})
549548

550-
ginkgo.Describe("Workload cluster in multiple AZs", func() {
551-
ginkgo.It("It should be creatable and deletable", func() {
552-
specName := "functional-test-multi-az"
553-
requiredResources = &shared.TestResource{EC2Normal: 3 * e2eCtx.Settings.InstanceVCPU, IGW: 1, NGW: 1, VPC: 1, ClassicLB: 1, EIP: 3}
554-
requiredResources.WriteRequestedResources(e2eCtx, specName)
555-
Expect(shared.AcquireResources(requiredResources, config.GinkgoConfig.ParallelNode, flock.New(shared.ResourceQuotaFilePath))).To(Succeed())
556-
defer shared.ReleaseResources(requiredResources, config.GinkgoConfig.ParallelNode, flock.New(shared.ResourceQuotaFilePath))
557-
namespace := shared.SetupSpecNamespace(ctx, specName, e2eCtx)
558-
defer shared.DumpSpecResourcesAndCleanup(ctx, "", namespace, e2eCtx)
559-
ginkgo.By("Creating a cluster")
560-
clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
561-
configCluster := defaultConfigCluster(clusterName, namespace.Name)
562-
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(3)
563-
configCluster.Flavor = shared.MultiAzFlavor
564-
cluster, _, _ := createCluster(ctx, configCluster, result)
565-
566-
ginkgo.By("Adding worker nodes to additional subnets")
567-
mdName1 := clusterName + "-md-1"
568-
mdName2 := clusterName + "-md-2"
569-
md1 := makeMachineDeployment(namespace.Name, mdName1, clusterName, 1)
570-
md2 := makeMachineDeployment(namespace.Name, mdName2, clusterName, 1)
571-
az1 := os.Getenv(shared.AwsAvailabilityZone1)
572-
az2 := os.Getenv(shared.AwsAvailabilityZone2)
573-
574-
// private CIDRs set in cluster-template-multi-az.yaml.
575-
framework.CreateMachineDeployment(ctx, framework.CreateMachineDeploymentInput{
576-
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
577-
MachineDeployment: md1,
578-
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, mdName1),
579-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName1, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), pointer.StringPtr(az1), getSubnetID("cidr-block", "10.0.0.0/24", clusterName)),
580-
})
581-
framework.CreateMachineDeployment(ctx, framework.CreateMachineDeploymentInput{
582-
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
583-
MachineDeployment: md2,
584-
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, mdName2),
585-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName2, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), pointer.StringPtr(az2), getSubnetID("cidr-block", "10.0.2.0/24", clusterName)),
586-
})
587-
588-
ginkgo.By("Waiting for new worker nodes to become ready")
589-
k8sClient := e2eCtx.Environment.BootstrapClusterProxy.GetClient()
590-
framework.WaitForMachineDeploymentNodesToExist(ctx, framework.WaitForMachineDeploymentNodesToExistInput{Lister: k8sClient, Cluster: cluster, MachineDeployment: md1}, e2eCtx.E2EConfig.GetIntervals("", "wait-worker-nodes")...)
591-
framework.WaitForMachineDeploymentNodesToExist(ctx, framework.WaitForMachineDeploymentNodesToExistInput{Lister: k8sClient, Cluster: cluster, MachineDeployment: md2}, e2eCtx.E2EConfig.GetIntervals("", "wait-worker-nodes")...)
592-
})
593-
})
594-
595549
// TODO @randomvariable: Await more resources
596550
ginkgo.PDescribe("Multiple workload clusters", func() {
597551
ginkgo.Context("in different namespaces with machine failures", func() {

0 commit comments

Comments
 (0)