Skip to content

Commit a878139

Browse files
committed
Fix e2e tests
Signed-off-by: Tamal Saha <[email protected]>
1 parent 40d23f3 commit a878139

15 files changed

+37
-37
lines changed

test/e2e/shared/aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ func DumpCloudTrailEvents(e2eCtx *E2EContext) {
903903
// conformanceImageID looks up a specific image for a given
904904
// Kubernetes version in the e2econfig.
905905
func conformanceImageID(e2eCtx *E2EContext) string {
906-
ver := e2eCtx.E2EConfig.GetVariable("CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION")
906+
ver := e2eCtx.E2EConfig.MustGetVariable("CONFORMANCE_CI_ARTIFACTS_KUBERNETES_VERSION")
907907
amiName := AMIPrefix + ver + "*"
908908

909909
By(fmt.Sprintf("Searching for AMI: name=%s", amiName))

test/e2e/shared/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func createClusterctlLocalRepository(e2eCtx *E2EContext, repositoryFolder string
4343
if !e2eCtx.IsManaged {
4444
// Ensuring a CNI file is defined in the config and register a FileTransformation to inject the referenced file as in place of the CNI_RESOURCES envSubst variable.
4545
Expect(e2eCtx.E2EConfig.Variables).To(HaveKey(capi_e2e.CNIPath), "Missing %s variable in the config", capi_e2e.CNIPath)
46-
cniPath := e2eCtx.E2EConfig.GetVariable(capi_e2e.CNIPath)
46+
cniPath := e2eCtx.E2EConfig.MustGetVariable(capi_e2e.CNIPath)
4747
Expect(cniPath).To(BeAnExistingFile(), "The %s variable should resolve to an existing file", capi_e2e.CNIPath)
4848
createRepositoryInput.RegisterClusterResourceSetConfigMapTransformation(cniPath, capi_e2e.CNIResources)
4949
}
@@ -60,7 +60,7 @@ func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme,
6060
if !useExistingCluster {
6161
clusterProvider = bootstrap.CreateKindBootstrapClusterAndLoadImages(context.TODO(), bootstrap.CreateKindBootstrapClusterAndLoadImagesInput{
6262
Name: config.ManagementClusterName,
63-
KubernetesVersion: config.GetVariable(KubernetesVersionManagement),
63+
KubernetesVersion: config.MustGetVariable(KubernetesVersionManagement),
6464
RequiresDockerSock: config.HasDockerProvider(),
6565
Images: config.Images,
6666
})

test/e2e/shared/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ func DumpSpecResourcesAndCleanup(ctx context.Context, specName string, namespace
7676
intervals := e2eCtx.E2EConfig.GetIntervals(specName, "wait-delete-cluster")
7777
By(fmt.Sprintf("Deleting all clusters in the %q namespace with intervals %q", namespace.Name, intervals))
7878
framework.DeleteAllClustersAndWait(ctx, framework.DeleteAllClustersAndWaitInput{
79-
Client: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
80-
Namespace: namespace.Name,
79+
ClusterProxy: e2eCtx.Environment.BootstrapClusterProxy,
80+
Namespace: namespace.Name,
8181
}, intervals...)
8282

8383
By(fmt.Sprintf("Deleting namespace used for hosting the %q test spec", specName))

test/e2e/shared/suite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
180180
WriteAWSResourceQuotesToFile(path.Join(e2eCtx.Settings.ArtifactFolder, "initial-aws-resource-quotas.yaml"), originalQuotas)
181181
}
182182

183-
e2eCtx.Settings.InstanceVCPU, err = strconv.Atoi(e2eCtx.E2EConfig.GetVariable(InstanceVcpu))
183+
e2eCtx.Settings.InstanceVCPU, err = strconv.Atoi(e2eCtx.E2EConfig.MustGetVariable(InstanceVcpu))
184184
Expect(err).NotTo(HaveOccurred())
185185

186186
By("Initializing the bootstrap cluster")

test/e2e/suites/conformance/conformance_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ var _ = ginkgo.Describe("[unmanaged] [conformance] tests", func() {
6666
ginkgo.AddReportEntry(experiment.Name, experiment)
6767
experiment.Sample(func(idx int) {
6868
shared.SetEnvVar("USE_CI_ARTIFACTS", "true", false)
69-
kubernetesVersion := e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion)
69+
kubernetesVersion := e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion)
7070
flavor := clusterctl.DefaultFlavor
7171
if e2eCtx.Settings.UseCIArtifacts {
7272
flavor = "conformance-ci-artifacts"
7373
var err error
7474
kubernetesVersion, err = kubernetesversions.LatestCIRelease()
7575
Expect(err).NotTo(HaveOccurred())
7676
}
77-
workerMachineCount, err := strconv.ParseInt(e2eCtx.E2EConfig.GetVariable("CONFORMANCE_WORKER_MACHINE_COUNT"), 10, 64)
77+
workerMachineCount, err := strconv.ParseInt(e2eCtx.E2EConfig.MustGetVariable("CONFORMANCE_WORKER_MACHINE_COUNT"), 10, 64)
7878
Expect(err).NotTo(HaveOccurred())
79-
controlPlaneMachineCount, err := strconv.ParseInt(e2eCtx.E2EConfig.GetVariable("CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT"), 10, 64)
79+
controlPlaneMachineCount, err := strconv.ParseInt(e2eCtx.E2EConfig.MustGetVariable("CONFORMANCE_CONTROL_PLANE_MACHINE_COUNT"), 10, 64)
8080
Expect(err).NotTo(HaveOccurred())
8181

8282
// Starting with Kubernetes v1.25, the kubetest config file needs to be compatible with Ginkgo V2.

test/e2e/suites/gc_managed/gc_managed_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var _ = ginkgo.Describe("[managed] [gc] EKS Cluster external resource GC tests",
100100
Expect(len(mp)).To(Equal(1))
101101

102102
workloadClusterProxy := e2eCtx.Environment.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name)
103-
workloadYamlPath := e2eCtx.E2EConfig.GetVariable(shared.GcWorkloadPath)
103+
workloadYamlPath := e2eCtx.E2EConfig.MustGetVariable(shared.GcWorkloadPath)
104104
ginkgo.By(fmt.Sprintf("Installing sample workload with load balancer services: %s", workloadYamlPath))
105105
workloadYaml, err := os.ReadFile(workloadYamlPath) //nolint:gosec
106106
Expect(err).ShouldNot(HaveOccurred())
@@ -221,7 +221,7 @@ var _ = ginkgo.Describe("[managed] [gc] EKS Cluster external resource GC tests",
221221
Expect(len(mp)).To(Equal(1))
222222

223223
workloadClusterProxy := e2eCtx.Environment.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name)
224-
workloadYamlPath := e2eCtx.E2EConfig.GetVariable(shared.GcWorkloadPath)
224+
workloadYamlPath := e2eCtx.E2EConfig.MustGetVariable(shared.GcWorkloadPath)
225225
ginkgo.By(fmt.Sprintf("Installing sample workload with load balancer services: %s", workloadYamlPath))
226226
workloadYaml, err := os.ReadFile(workloadYamlPath) //nolint:gosec
227227
Expect(err).ShouldNot(HaveOccurred())
@@ -300,7 +300,7 @@ func defaultConfigCluster(clusterName, namespace string) clusterctl.ConfigCluste
300300
Flavor: ms.EKSManagedPoolFlavor,
301301
Namespace: namespace,
302302
ClusterName: clusterName,
303-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
303+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
304304
ControlPlaneMachineCount: ptr.To[int64](1),
305305
WorkerMachineCount: ptr.To[int64](0),
306306
}

test/e2e/suites/gc_unmanaged/gc_unmanaged_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var _ = ginkgo.Context("[unmanaged] [gc]", func() {
7979
Expect(cluster).NotTo(BeNil(), "couldn't find cluster")
8080

8181
workloadClusterProxy := e2eCtx.Environment.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name)
82-
workloadYamlPath := e2eCtx.E2EConfig.GetVariable(shared.GcWorkloadPath)
82+
workloadYamlPath := e2eCtx.E2EConfig.MustGetVariable(shared.GcWorkloadPath)
8383
ginkgo.By(fmt.Sprintf("Installing sample workload with load balancer services: %s", workloadYamlPath))
8484
workloadYaml, err := os.ReadFile(workloadYamlPath) //nolint:gosec
8585
Expect(err).ShouldNot(HaveOccurred())
@@ -183,7 +183,7 @@ var _ = ginkgo.Context("[unmanaged] [gc]", func() {
183183
Expect(cluster).NotTo(BeNil(), "couldn't find cluster")
184184

185185
workloadClusterProxy := e2eCtx.Environment.BootstrapClusterProxy.GetWorkloadCluster(ctx, cluster.Namespace, cluster.Name)
186-
workloadYamlPath := e2eCtx.E2EConfig.GetVariable(shared.GcWorkloadPath)
186+
workloadYamlPath := e2eCtx.E2EConfig.MustGetVariable(shared.GcWorkloadPath)
187187
ginkgo.By(fmt.Sprintf("Installing sample workload with load balancer services: %s", workloadYamlPath))
188188
workloadYaml, err := os.ReadFile(workloadYamlPath) //nolint:gosec
189189
Expect(err).ShouldNot(HaveOccurred())
@@ -262,7 +262,7 @@ func defaultConfigCluster(clusterName, namespace string) clusterctl.ConfigCluste
262262
Flavor: clusterctl.DefaultFlavor,
263263
Namespace: namespace,
264264
ClusterName: clusterName,
265-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
265+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
266266
ControlPlaneMachineCount: ptr.To[int64](1),
267267
WorkerMachineCount: ptr.To[int64](0),
268268
}

test/e2e/suites/managed/eks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var _ = ginkgo.Describe("[managed] [general] EKS cluster tests", func() {
9393
Namespace: namespace,
9494
ClusterName: clusterName,
9595
AddonName: cniAddonName,
96-
AddonVersion: e2eCtx.E2EConfig.GetVariable(shared.CNIAddonVersion),
96+
AddonVersion: e2eCtx.E2EConfig.MustGetVariable(shared.CNIAddonVersion),
9797
}
9898
})
9999

test/e2e/suites/managed/helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func defaultConfigCluster(clusterName, namespace string) clusterctl.ConfigCluste
3737
Flavor: EKSManagedPoolFlavor,
3838
Namespace: namespace,
3939
ClusterName: clusterName,
40-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
40+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
4141
ControlPlaneMachineCount: ptr.To[int64](1),
4242
WorkerMachineCount: ptr.To[int64](0),
4343
}

test/e2e/suites/managed/upgrade_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ var _ = ginkgo.Describe("EKS Cluster upgrade test", func() {
5555
namespace = shared.SetupSpecNamespace(ctx, specName, e2eCtx)
5656
clusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6))
5757

58-
initialVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeFromVersion)
59-
upgradeToVersion = e2eCtx.E2EConfig.GetVariable(shared.EksUpgradeToVersion)
58+
initialVersion = e2eCtx.E2EConfig.MustGetVariable(shared.EksUpgradeFromVersion)
59+
upgradeToVersion = e2eCtx.E2EConfig.MustGetVariable(shared.EksUpgradeToVersion)
6060

6161
ginkgo.By("default iam role should exist")
6262
VerifyRoleExistsAndOwned(ekscontrolplanev1.DefaultEKSControlPlaneRole, clusterName, false, e2eCtx.BootstrapUserAWSSession)

test/e2e/suites/unmanaged/helpers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func defaultConfigCluster(clusterName, namespace string) clusterctl.ConfigCluste
9797
Flavor: clusterctl.DefaultFlavor,
9898
Namespace: namespace,
9999
ClusterName: clusterName,
100-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
100+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
101101
ControlPlaneMachineCount: ptr.To[int64](1),
102102
WorkerMachineCount: ptr.To[int64](0),
103103
}
@@ -303,7 +303,7 @@ func makeMachineDeployment(namespace, mdName, clusterName string, az *string, re
303303
Name: mdName,
304304
Namespace: namespace,
305305
},
306-
Version: ptr.To[string](e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion)),
306+
Version: ptr.To[string](e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion)),
307307
},
308308
},
309309
},

test/e2e/suites/unmanaged/unmanaged_CAPI_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ var _ = ginkgo.Context("[unmanaged] [Cluster API Framework]", func() {
131131
ArtifactFolder: e2eCtx.Settings.ArtifactFolder,
132132
SkipCleanup: e2eCtx.Settings.SkipCleanup,
133133
MgmtFlavor: "remote-management-cluster",
134-
InitWithBinary: e2eCtx.E2EConfig.GetVariable("INIT_WITH_BINARY_V1BETA1"),
135-
InitWithKubernetesVersion: e2eCtx.E2EConfig.GetVariable("INIT_WITH_KUBERNETES_VERSION"),
134+
InitWithBinary: e2eCtx.E2EConfig.MustGetVariable("INIT_WITH_BINARY_V1BETA1"),
135+
InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable("INIT_WITH_KUBERNETES_VERSION"),
136136
InitWithProvidersContract: "v1beta1",
137137
InitWithCoreProvider: "cluster-api:v1.2.0",
138138
InitWithBootstrapProviders: []string{"kubeadm:v1.2.0"},

test/e2e/suites/unmanaged/unmanaged_classic_elb_upgrade_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ var _ = ginkgo.Context("[unmanaged] [upgrade]", func() {
6969
ctx = context.TODO()
7070
managementClusterResources = new(clusterctl.ApplyClusterTemplateAndWaitResult)
7171

72-
kubernetesVersionFrom = e2eCtx.E2EConfig.GetVariable(shared.ClassicElbTestKubernetesFrom)
72+
kubernetesVersionFrom = e2eCtx.E2EConfig.MustGetVariable(shared.ClassicElbTestKubernetesFrom)
7373
Expect(kubernetesVersionFrom).ToNot(BeEmpty(), "kubernetesVersionFrom is not set")
74-
kubernetesVersionTo = e2eCtx.E2EConfig.GetVariable(shared.ClassicElbTestKubernetesTo)
74+
kubernetesVersionTo = e2eCtx.E2EConfig.MustGetVariable(shared.ClassicElbTestKubernetesTo)
7575
Expect(kubernetesVersionTo).ToNot(BeEmpty(), "kubernetesVersionTo is not set")
7676
})
7777

@@ -116,7 +116,7 @@ var _ = ginkgo.Context("[unmanaged] [upgrade]", func() {
116116
ginkgo.It("Should create a management cluster and upgrade the workload cluster to v1.30+", func() {
117117
managementClusterName = fmt.Sprintf("%s-management-%s", specName, util.RandomString(6))
118118
managementClusterLogFolder := filepath.Join(e2eCtx.Settings.ArtifactFolder, "clusters", managementClusterName)
119-
managemntClusterVersion := e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersionManagement)
119+
managemntClusterVersion := e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersionManagement)
120120

121121
ginkgo.By("Creating a kind cluster to be used as a new management cluster")
122122

test/e2e/suites/unmanaged/unmanaged_functional_clusterclass_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var _ = ginkgo.Context("[unmanaged] [functional] [ClusterClass]", func() {
7373
Flavor: shared.NestedMultitenancyClusterClassFlavor,
7474
Namespace: namespace.Name,
7575
ClusterName: clusterName,
76-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
76+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
7777
ControlPlaneMachineCount: ptr.To[int64](1),
7878
WorkerMachineCount: ptr.To[int64](0),
7979
},

test/e2e/suites/unmanaged/unmanaged_functional_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
144144
Flavor: shared.GPUFlavor,
145145
Namespace: namespace.Name,
146146
ClusterName: clusterName,
147-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
147+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
148148
ControlPlaneMachineCount: ptr.To[int64](1),
149149
WorkerMachineCount: ptr.To[int64](1),
150150
},
@@ -195,7 +195,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
195195
Flavor: shared.NestedMultitenancyFlavor,
196196
Namespace: namespace.Name,
197197
ClusterName: clusterName,
198-
KubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
198+
KubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion),
199199
ControlPlaneMachineCount: ptr.To[int64](1),
200200
WorkerMachineCount: ptr.To[int64](0),
201201
},
@@ -210,7 +210,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
210210
expectAWSClusterConditions(awsCluster, []conditionAssertion{{infrav1.BastionHostReadyCondition, corev1.ConditionTrue, "", ""}})
211211

212212
mdName := clusterName + "-md01"
213-
machineTempalte := makeAWSMachineTemplate(namespace.Name, mdName, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), nil)
213+
machineTempalte := makeAWSMachineTemplate(namespace.Name, mdName, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), nil)
214214
// A test to set IMDSv2 explicitly
215215
machineTempalte.Spec.Template.Spec.InstanceMetadataOptions = &infrav1.InstanceMetadataOptions{
216216
HTTPEndpoint: infrav1.InstanceMetadataEndpointStateEnabled,
@@ -263,7 +263,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
263263
cluster1Name := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
264264
shared.SetEnvVar("USE_CI_ARTIFACTS", "true", false)
265265
tagPrefix := "v"
266-
searchSemVer, err := semver.Make(strings.TrimPrefix(e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion), tagPrefix))
266+
searchSemVer, err := semver.Make(strings.TrimPrefix(e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), tagPrefix))
267267
Expect(err).NotTo(HaveOccurred())
268268

269269
shared.SetEnvVar(shared.KubernetesVersion, "v"+searchSemVer.String(), false)
@@ -280,7 +280,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
280280
cluster2, md, kcp := createCluster(ctx, configCluster, result)
281281

282282
ginkgo.By(fmt.Sprintf("Waiting for Kubernetes versions of machines in MachineDeployment %s/%s to be upgraded from %s to %s",
283-
md[0].Namespace, md[0].Name, e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion), kubernetesUgradeVersion))
283+
md[0].Namespace, md[0].Name, e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), kubernetesUgradeVersion))
284284

285285
framework.WaitForMachineDeploymentMachinesToBeUpgraded(ctx, framework.WaitForMachineDeploymentMachinesToBeUpgradedInput{
286286
Lister: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
@@ -363,7 +363,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
363363
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
364364
MachineDeployment: makeMachineDeployment(namespace.Name, md1Name, clusterName, nil, 1),
365365
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, md1Name),
366-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, md1Name, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), ptr.To[string]("invalid-subnet")),
366+
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, md1Name, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), ptr.To[string]("invalid-subnet")),
367367
})
368368

369369
ginkgo.By("Looking for failure event to be reported")
@@ -382,7 +382,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
382382
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
383383
MachineDeployment: makeMachineDeployment(namespace.Name, md2Name, clusterName, invalidAz, 1),
384384
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, md2Name),
385-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, md2Name, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), nil),
385+
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, md2Name, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), nil),
386386
})
387387

388388
ginkgo.By("Looking for failure event to be reported")
@@ -433,13 +433,13 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
433433
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
434434
MachineDeployment: md1,
435435
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, mdName1),
436-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName1, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), getSubnetID("cidr-block", "10.0.0.0/24", clusterName)),
436+
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName1, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), getSubnetID("cidr-block", "10.0.0.0/24", clusterName)),
437437
})
438438
framework.CreateMachineDeployment(ctx, framework.CreateMachineDeploymentInput{
439439
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
440440
MachineDeployment: md2,
441441
BootstrapConfigTemplate: makeJoinBootstrapConfigTemplate(namespace.Name, mdName2),
442-
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName2, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), getSubnetID("cidr-block", "10.0.2.0/24", clusterName)),
442+
InfraMachineTemplate: makeAWSMachineTemplate(namespace.Name, mdName2, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), getSubnetID("cidr-block", "10.0.2.0/24", clusterName)),
443443
})
444444

445445
ginkgo.By("Waiting for new worker nodes to become ready")
@@ -890,7 +890,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
890890

891891
ginkgo.By("Creating a MachineDeployment bootstrapped via Ignition with StorageType UnencryptedUserData")
892892
unencryptedMDName := clusterName + "-md-unencrypted-userdata"
893-
unencryptedUDMachineTemplate := makeAWSMachineTemplate(namespace.Name, unencryptedMDName, e2eCtx.E2EConfig.GetVariable(shared.AwsNodeMachineType), nil)
893+
unencryptedUDMachineTemplate := makeAWSMachineTemplate(namespace.Name, unencryptedMDName, e2eCtx.E2EConfig.MustGetVariable(shared.AwsNodeMachineType), nil)
894894
unencryptedUDMachineTemplate.Spec.Template.Spec.ImageLookupBaseOS = "flatcar-stable"
895895
unencryptedUDMachineTemplate.Spec.Template.Spec.Ignition = &infrav1.Ignition{
896896
StorageType: infrav1.IgnitionStorageTypeOptionUnencryptedUserData,

0 commit comments

Comments
 (0)