|
| 1 | +//go:build e2e |
| 2 | +// +build e2e |
| 3 | + |
| 4 | +/* |
| 5 | +Copyright 2021 The Kubernetes Authors. |
| 6 | +
|
| 7 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +you may not use this file except in compliance with the License. |
| 9 | +You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | +Unless required by applicable law or agreed to in writing, software |
| 14 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +See the License for the specific language governing permissions and |
| 17 | +limitations under the License. |
| 18 | +*/ |
| 19 | + |
| 20 | +package e2e |
| 21 | + |
| 22 | +import ( |
| 23 | + "context" |
| 24 | + |
| 25 | + . "github.com/onsi/ginkgo" |
| 26 | + capi_e2e "sigs.k8s.io/cluster-api/test/e2e" |
| 27 | + |
| 28 | + "sigs.k8s.io/cluster-api-provider-openstack/test/e2e/shared" |
| 29 | +) |
| 30 | + |
| 31 | +// Note: There isn't really anything fixing this to the v0.6 release. The test will |
| 32 | +// simply pick the latest release with the correct contract from the E2EConfig, as seen here |
| 33 | +// https://github.com/kubernetes-sigs/cluster-api/blob/3abb9089485f51d46054096c17ccb8b59f0f7331/test/e2e/clusterctl_upgrade.go#L265 |
| 34 | +// When new minor releases are added (with the same contract) we will need to work on this |
| 35 | +// if we want to continue testing v0.6. |
| 36 | +var _ = Describe("When testing clusterctl upgrades (v0.6=>current) [clusterctl-upgrade]", func() { |
| 37 | + ctx := context.TODO() |
| 38 | + shared.SetEnvVar("USE_CI_ARTIFACTS", "true", false) |
| 39 | + shared.SetEnvVar("DOWNLOAD_E2E_IMAGE", "true", false) |
| 40 | + shared.SetEnvVar("E2E_IMAGE_URL", "http://10.0.3.15/capo-e2e-image.tar", false) |
| 41 | + |
| 42 | + capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput { |
| 43 | + return capi_e2e.ClusterctlUpgradeSpecInput{ |
| 44 | + E2EConfig: e2eCtx.E2EConfig, |
| 45 | + ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, |
| 46 | + BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, |
| 47 | + ArtifactFolder: e2eCtx.Settings.ArtifactFolder, |
| 48 | + SkipCleanup: false, |
| 49 | + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.4/clusterctl-{OS}-{ARCH}", |
| 50 | + InitWithProvidersContract: "v1beta1", |
| 51 | + MgmtFlavor: shared.FlavorDefault, |
| 52 | + WorkloadFlavor: shared.FlavorV1alpha5, |
| 53 | + } |
| 54 | + }) |
| 55 | +}) |
0 commit comments