Skip to content

Commit

Permalink
e2e fix attempt
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev committed Jan 22, 2025
1 parent 3d5dd5d commit 0abcc7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/e2e/specs/import_gitops_mgmtv3.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type CreateMgmtV3UsingGitOpsSpecInput struct {
// automatically imports into Rancher Manager.
func CreateMgmtV3UsingGitOpsSpec(ctx context.Context, inputGetter func() CreateMgmtV3UsingGitOpsSpecInput) {
var (
specName = "creategitops-v3"
specName = "creategitops"
input CreateMgmtV3UsingGitOpsSpecInput
namespace *corev1.Namespace
repoName string
Expand Down Expand Up @@ -172,6 +172,7 @@ func CreateMgmtV3UsingGitOpsSpec(ctx context.Context, inputGetter func() CreateM
input = inputGetter()
Expect(turtlesframework.Parse(&input)).To(Succeed(), "Failed to parse environment variables")

Expect(input.GitAddr).ToNot(BeEmpty(), "Invalid argument. input.GitAddr can't be empty when calling %s spec", specName)
Expect(input.E2EConfig).ToNot(BeNil(), "Invalid argument. input.E2EConfig can't be nil when calling %s spec", specName)
Expect(input.BootstrapClusterProxy).ToNot(BeNil(), "Invalid argument. input.BootstrapClusterProxy can't be nil when calling %s spec", specName)
Expect(os.MkdirAll(input.ArtifactFolder, 0750)).To(Succeed(), "Invalid argument. input.ArtifactFolder can't be created for %s spec", specName)
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/suites/import-gitops-v3/import_gitops_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var _ = Describe("[Azure] [AKS] - [management.cattle.io/v3] Create and delete CA
E2EConfig: e2e.LoadE2EConfig(),
BootstrapClusterProxy: bootstrapClusterProxy,
ClusterTemplate: e2e.CAPIAzureAKSTopology,
ClusterName: "highlander-e2e-topology",
ClusterName: "cluster-aks",
ControlPlaneMachineCount: ptr.To[int](1),
WorkerMachineCount: ptr.To[int](1),
GitAddr: gitAddress,
Expand All @@ -125,7 +125,7 @@ var _ = Describe("[AWS] [EKS] - [management.cattle.io/v3] Create and delete CAPI
E2EConfig: e2e.LoadE2EConfig(),
BootstrapClusterProxy: bootstrapClusterProxy,
ClusterTemplate: e2e.CAPIAwsEKSMMP,
ClusterName: "clusterv3-eks",
ClusterName: "cluster-eks",
ControlPlaneMachineCount: ptr.To[int](1),
WorkerMachineCount: ptr.To[int](1),
GitAddr: gitAddress,
Expand All @@ -152,7 +152,7 @@ var _ = Describe("[GCP] [GKE] - [management.cattle.io/v3] Create and delete CAPI
E2EConfig: e2e.LoadE2EConfig(),
BootstrapClusterProxy: bootstrapClusterProxy,
ClusterTemplate: e2e.CAPIGCPGKE,
ClusterName: "clusterv3-gke",
ClusterName: "cluster-gke",
ControlPlaneMachineCount: ptr.To[int](1),
WorkerMachineCount: ptr.To[int](1),
GitAddr: gitAddress,
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/suites/import-gitops-v3/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ package import_gitops_v3

import (
"context"
"encoding/json"
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rancher/turtles/test/e2e"
"github.com/rancher/turtles/test/testenv"
"k8s.io/apimachinery/pkg/util/json"
capiframework "sigs.k8s.io/cluster-api/test/framework"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
Expand Down Expand Up @@ -158,11 +158,11 @@ var _ = SynchronizedAfterSuite(
},
func() {
testenv.UninstallGitea(ctx, testenv.UninstallGiteaInput{
BootstrapClusterProxy: setupClusterResult.BootstrapClusterProxy,
BootstrapClusterProxy: bootstrapClusterProxy,
})

testenv.UninstallRancherTurtles(ctx, testenv.UninstallRancherTurtlesInput{
BootstrapClusterProxy: setupClusterResult.BootstrapClusterProxy,
BootstrapClusterProxy: bootstrapClusterProxy,
})

testenv.CleanupTestCluster(ctx, testenv.CleanupTestClusterInput{
Expand Down

0 comments on commit 0abcc7e

Please sign in to comment.