@@ -231,56 +231,58 @@ var _ = Describe("Running the Cluster API E2E tests", func() {
231231 })
232232
233233 if os .Getenv ("LOCAL_ONLY" ) != "true" {
234- Context ("upgrade from v1alpha3 to v1beta1, and scale workload clusters created in v1alpha3" , func () {
235- BeforeEach (func () {
236- // Unset resource group and vnet env variables, since we capi test creates 2 clusters,
237- // and will result in both the clusters using the same vnet and resource group.
238- Expect (os .Unsetenv (AzureResourceGroup )).To (Succeed ())
239- Expect (os .Unsetenv (AzureVNetName )).To (Succeed ())
240-
241- // Set base64 encoded values for v1alpha3 cluster.
242- Expect (os .Setenv ("AZURE_CLIENT_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv (AzureClientId ))))).To (Succeed ())
243- Expect (os .Setenv ("AZURE_CLIENT_SECRET_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv (AzureClientSecret ))))).To (Succeed ())
244- Expect (os .Setenv ("AZURE_SUBSCRIPTION_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv ("AZURE_SUBSCRIPTION_ID" ))))).To (Succeed ())
245- Expect (os .Setenv ("AZURE_TENANT_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv ("AZURE_TENANT_ID" ))))).To (Succeed ())
246-
247- // Unset windows specific variables
248- Expect (os .Unsetenv ("WINDOWS_WORKER_MACHINE_COUNT" )).To (Succeed ())
249- Expect (os .Unsetenv ("K8S_FEATURE_GATES" )).To (Succeed ())
234+ Context ("API Version Upgrade" , func () {
235+ Context ("upgrade from v1alpha3 to v1beta1, and scale workload clusters created in v1alpha3 " , func () {
236+ BeforeEach (func () {
237+ // Unset resource group and vnet env variables, since we capi test creates 2 clusters,
238+ // and will result in both the clusters using the same vnet and resource group.
239+ Expect (os .Unsetenv (AzureResourceGroup )).To (Succeed ())
240+ Expect (os .Unsetenv (AzureVNetName )).To (Succeed ())
241+
242+ // Set base64 encoded values for v1alpha3 cluster.
243+ Expect (os .Setenv ("AZURE_CLIENT_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv (AzureClientId ))))).To (Succeed ())
244+ Expect (os .Setenv ("AZURE_CLIENT_SECRET_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv (AzureClientSecret ))))).To (Succeed ())
245+ Expect (os .Setenv ("AZURE_SUBSCRIPTION_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv ("AZURE_SUBSCRIPTION_ID" ))))).To (Succeed ())
246+ Expect (os .Setenv ("AZURE_TENANT_ID_B64" , base64 .StdEncoding .EncodeToString ([]byte (os .Getenv ("AZURE_TENANT_ID" ))))).To (Succeed ())
247+
248+ // Unset windows specific variables
249+ Expect (os .Unsetenv ("WINDOWS_WORKER_MACHINE_COUNT" )).To (Succeed ())
250+ Expect (os .Unsetenv ("K8S_FEATURE_GATES" )).To (Succeed ())
251+ })
252+ capi_e2e .ClusterctlUpgradeSpec (ctx , func () capi_e2e.ClusterctlUpgradeSpecInput {
253+ return capi_e2e.ClusterctlUpgradeSpecInput {
254+ E2EConfig : e2eConfig ,
255+ ClusterctlConfigPath : clusterctlConfigPath ,
256+ BootstrapClusterProxy : bootstrapClusterProxy ,
257+ ArtifactFolder : artifactFolder ,
258+ SkipCleanup : skipCleanup ,
259+ }
260+ })
250261 })
251- capi_e2e .ClusterctlUpgradeSpec (ctx , func () capi_e2e.ClusterctlUpgradeSpecInput {
252- return capi_e2e.ClusterctlUpgradeSpecInput {
253- E2EConfig : e2eConfig ,
254- ClusterctlConfigPath : clusterctlConfigPath ,
255- BootstrapClusterProxy : bootstrapClusterProxy ,
256- ArtifactFolder : artifactFolder ,
257- SkipCleanup : skipCleanup ,
258- }
259- })
260- })
261-
262- Context ("upgrade from v1alpha4 to v1beta1, and scale workload clusters created in v1alpha4" , func () {
263- BeforeEach (func () {
264- // Unset resource group and vnet env variables, since we capi test creates 2 clusters,
265- // and will result in both the clusters using the same vnet and resource group.
266- Expect (os .Unsetenv (AzureResourceGroup )).To (Succeed ())
267- Expect (os .Unsetenv (AzureVNetName )).To (Succeed ())
268262
269- // Unset windows specific variables
270- Expect (os .Unsetenv ("WINDOWS_WORKER_MACHINE_COUNT" )).To (Succeed ())
271- Expect (os .Unsetenv ("K8S_FEATURE_GATES" )).To (Succeed ())
272- })
273- capi_e2e .ClusterctlUpgradeSpec (ctx , func () capi_e2e.ClusterctlUpgradeSpecInput {
274- return capi_e2e.ClusterctlUpgradeSpecInput {
275- E2EConfig : e2eConfig ,
276- ClusterctlConfigPath : clusterctlConfigPath ,
277- BootstrapClusterProxy : bootstrapClusterProxy ,
278- ArtifactFolder : artifactFolder ,
279- SkipCleanup : skipCleanup ,
280- InitWithProvidersContract : "v1alpha4" ,
281- InitWithBinary : "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/clusterctl-{OS}-{ARCH}" ,
282- PreInit : getPreInitFunc (ctx ),
283- }
263+ Context ("upgrade from v1alpha4 to v1beta1, and scale workload clusters created in v1alpha4" , func () {
264+ BeforeEach (func () {
265+ // Unset resource group and vnet env variables, since we capi test creates 2 clusters,
266+ // and will result in both the clusters using the same vnet and resource group.
267+ Expect (os .Unsetenv (AzureResourceGroup )).To (Succeed ())
268+ Expect (os .Unsetenv (AzureVNetName )).To (Succeed ())
269+
270+ // Unset windows specific variables
271+ Expect (os .Unsetenv ("WINDOWS_WORKER_MACHINE_COUNT" )).To (Succeed ())
272+ Expect (os .Unsetenv ("K8S_FEATURE_GATES" )).To (Succeed ())
273+ })
274+ capi_e2e .ClusterctlUpgradeSpec (ctx , func () capi_e2e.ClusterctlUpgradeSpecInput {
275+ return capi_e2e.ClusterctlUpgradeSpecInput {
276+ E2EConfig : e2eConfig ,
277+ ClusterctlConfigPath : clusterctlConfigPath ,
278+ BootstrapClusterProxy : bootstrapClusterProxy ,
279+ ArtifactFolder : artifactFolder ,
280+ SkipCleanup : skipCleanup ,
281+ InitWithProvidersContract : "v1alpha4" ,
282+ InitWithBinary : "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/clusterctl-{OS}-{ARCH}" ,
283+ PreInit : getPreInitFunc (ctx ),
284+ }
285+ })
284286 })
285287 })
286288 }
0 commit comments