@@ -113,7 +113,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
113113 Expect (input .E2EConfig .Variables ).To (HaveKey (KubernetesVersionUpgradeTo ))
114114
115115 Expect (input .E2EConfig .Variables ).To (HaveKey (kubetestConfigurationVariable ), "% spec requires a %s variable to be defined in the config file" , specName , kubetestConfigurationVariable )
116- kubetestConfigFilePath = input .E2EConfig .GetVariable (kubetestConfigurationVariable )
116+ kubetestConfigFilePath = input .E2EConfig .MustGetVariable (kubetestConfigurationVariable )
117117 Expect (kubetestConfigFilePath ).To (BeAnExistingFile (), "%s should be a valid kubetest config file" )
118118
119119 if input .ControlPlaneMachineCount == nil {
@@ -129,10 +129,10 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
129129 }
130130
131131 if input .E2EConfig .HasVariable (EtcdVersionUpgradeTo ) {
132- etcdVersionUpgradeTo = input .E2EConfig .GetVariable (EtcdVersionUpgradeTo )
132+ etcdVersionUpgradeTo = input .E2EConfig .MustGetVariable (EtcdVersionUpgradeTo )
133133 }
134134 if input .E2EConfig .HasVariable (CoreDNSVersionUpgradeTo ) {
135- coreDNSVersionUpgradeTo = input .E2EConfig .GetVariable (CoreDNSVersionUpgradeTo )
135+ coreDNSVersionUpgradeTo = input .E2EConfig .MustGetVariable (CoreDNSVersionUpgradeTo )
136136 }
137137
138138 // Setup a Namespace where to host objects for this spec and create a watcher for the Namespace events.
@@ -160,7 +160,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
160160 Flavor : ptr .Deref (input .Flavor , "upgrades" ),
161161 Namespace : namespace .Name ,
162162 ClusterName : clusterName ,
163- KubernetesVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeFrom ),
163+ KubernetesVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeFrom ),
164164 ControlPlaneMachineCount : ptr.To [int64 ](controlPlaneMachineCount ),
165165 WorkerMachineCount : ptr.To [int64 ](workerMachineCount ),
166166 },
@@ -182,7 +182,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
182182 DNSImageTag : coreDNSVersionUpgradeTo ,
183183 MachineDeployments : clusterResources .MachineDeployments ,
184184 MachinePools : clusterResources .MachinePools ,
185- KubernetesUpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
185+ KubernetesUpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
186186 WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
187187 WaitForMachinePoolToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-pool-upgrade" ),
188188 WaitForKubeProxyUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
@@ -203,11 +203,11 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
203203 )
204204
205205 if input .E2EConfig .HasVariable (CPMachineTemplateUpgradeTo ) {
206- upgradeCPMachineTemplateTo = ptr .To (input .E2EConfig .GetVariable (CPMachineTemplateUpgradeTo ))
206+ upgradeCPMachineTemplateTo = ptr .To (input .E2EConfig .MustGetVariable (CPMachineTemplateUpgradeTo ))
207207 }
208208
209209 if input .E2EConfig .HasVariable (WorkersMachineTemplateUpgradeTo ) {
210- upgradeWorkersMachineTemplateTo = ptr .To (input .E2EConfig .GetVariable (WorkersMachineTemplateUpgradeTo ))
210+ upgradeWorkersMachineTemplateTo = ptr .To (input .E2EConfig .MustGetVariable (WorkersMachineTemplateUpgradeTo ))
211211 }
212212
213213 framework .UpgradeControlPlaneAndWaitForUpgrade (ctx , framework.UpgradeControlPlaneAndWaitForUpgradeInput {
@@ -216,7 +216,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
216216 ControlPlane : clusterResources .ControlPlane ,
217217 EtcdImageTag : etcdVersionUpgradeTo ,
218218 DNSImageTag : coreDNSVersionUpgradeTo ,
219- KubernetesUpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
219+ KubernetesUpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
220220 UpgradeMachineTemplate : upgradeCPMachineTemplateTo ,
221221 WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
222222 WaitForKubeProxyUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
@@ -234,7 +234,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
234234 framework .UpgradeMachineDeploymentsAndWait (ctx , framework.UpgradeMachineDeploymentsAndWaitInput {
235235 ClusterProxy : input .BootstrapClusterProxy ,
236236 Cluster : clusterResources .Cluster ,
237- UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
237+ UpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
238238 UpgradeMachineTemplate : upgradeWorkersMachineTemplateTo ,
239239 MachineDeployments : clusterResources .MachineDeployments ,
240240 WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
@@ -245,7 +245,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
245245 framework .UpgradeMachinePoolAndWait (ctx , framework.UpgradeMachinePoolAndWaitInput {
246246 ClusterProxy : input .BootstrapClusterProxy ,
247247 Cluster : clusterResources .Cluster ,
248- UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
248+ UpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
249249 WaitForMachinePoolToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-pool-upgrade" ),
250250 MachinePools : clusterResources .MachinePools ,
251251 })
@@ -258,7 +258,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
258258 workloadClient := workloadProxy .GetClient ()
259259 framework .WaitForNodesReady (ctx , framework.WaitForNodesReadyInput {
260260 Lister : workloadClient ,
261- KubernetesVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
261+ KubernetesVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
262262 Count : int (clusterResources .ExpectedTotalNodes ()),
263263 WaitForNodesReady : input .E2EConfig .GetIntervals (specName , "wait-nodes-ready" ),
264264 })
0 commit comments