-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate auto-migration tests in a suite (#586)
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
- Loading branch information
1 parent
d7ecf2b
commit b759ca2
Showing
3 changed files
with
451 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
test/e2e/suites/migrate-gitops/migrate_gitops_provv1_mgmtv3_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//go:build e2e | ||
// +build e2e | ||
|
||
/* | ||
Copyright © 2023 - 2024 SUSE LLC | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrate_gitops | ||
|
||
import ( | ||
_ "embed" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
"sigs.k8s.io/controller-runtime/pkg/envtest/komega" | ||
|
||
"k8s.io/utils/ptr" | ||
|
||
"github.com/rancher/turtles/test/e2e" | ||
"github.com/rancher/turtles/test/e2e/specs" | ||
) | ||
|
||
var _ = Describe("[Docker] [Kubeadm] - [management.cattle.io/v3] Migrate v1 to management v3 cluster functionality should work", Label(e2e.ShortTestLabel), func() { | ||
BeforeEach(func() { | ||
komega.SetClient(setupClusterResult.BootstrapClusterProxy.GetClient()) | ||
komega.SetContext(ctx) | ||
}) | ||
|
||
specs.MigrateToV3UsingGitOpsSpec(ctx, func() specs.MigrateToV3UsingGitOpsSpecInput { | ||
return specs.MigrateToV3UsingGitOpsSpecInput{ | ||
HelmBinaryPath: flagVals.HelmBinaryPath, | ||
ChartPath: flagVals.ChartPath, | ||
E2EConfig: e2eConfig, | ||
BootstrapClusterProxy: setupClusterResult.BootstrapClusterProxy, | ||
ClusterctlConfigPath: flagVals.ConfigPath, | ||
ClusterctlBinaryPath: flagVals.ClusterctlBinaryPath, | ||
ArtifactFolder: flagVals.ArtifactFolder, | ||
ClusterTemplate: e2e.CAPIDockerKubeadm, | ||
ClusterName: "clusterv3-migrated", | ||
ControlPlaneMachineCount: ptr.To(1), | ||
WorkerMachineCount: ptr.To(1), | ||
GitAddr: giteaResult.GitAddress, | ||
GitAuthSecretName: e2e.AuthSecretName, | ||
SkipCleanup: false, | ||
SkipDeletionTest: false, | ||
LabelNamespace: true, | ||
TestClusterReimport: true, | ||
RancherServerURL: hostName, | ||
CAPIClusterCreateWaitName: "wait-rancher", | ||
DeleteClusterWaitName: "wait-controllers", | ||
CapiClusterOwnerLabel: e2e.CapiClusterOwnerLabel, | ||
CapiClusterOwnerNamespaceLabel: e2e.CapiClusterOwnerNamespaceLabel, | ||
OwnedLabelName: e2e.OwnedLabelName, | ||
} | ||
}) | ||
}) |
Oops, something went wrong.