Skip to content

Commit

Permalink
Merge pull request #617 from alexander-demicev/gitservice
Browse files Browse the repository at this point in the history
Fix gitea service type in E2E
  • Loading branch information
alexander-demicev authored Jul 26, 2024
2 parents f4a20bb + 04c9f0c commit 9a7fcfe
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions test/e2e/suites/embedded-capi-disabled-v3/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"k8s.io/klog/v2"
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
ctrl "sigs.k8s.io/controller-runtime"

"github.com/rancher/turtles/test/e2e"
"github.com/rancher/turtles/test/framework"
turtlesframework "github.com/rancher/turtles/test/framework"
"github.com/rancher/turtles/test/testenv"
corev1 "k8s.io/api/core/v1"
"k8s.io/klog/v2"
"sigs.k8s.io/cluster-api/test/framework/clusterctl"
ctrl "sigs.k8s.io/controller-runtime"
)

// Test suite flags.
Expand Down Expand Up @@ -242,10 +242,15 @@ var _ = BeforeSuite(func() {
giteaValues := map[string]string{
"gitea.admin.username": e2eConfig.GetVariable(e2e.GiteaUserNameVar),
"gitea.admin.password": e2eConfig.GetVariable(e2e.GiteaUserPasswordVar),
"service.http.type": "NodePort",
}

giteaServiceType := corev1.ServiceTypeNodePort
if flagVals.UseEKS {
giteaValues["service.http.type"] = "LoadBalancer"
giteaServiceType = corev1.ServiceTypeLoadBalancer
}

if flagVals.GiteaCustomIngress {
giteaServiceType = corev1.ServiceTypeClusterIP
}

giteaResult = testenv.DeployGitea(ctx, testenv.DeployGiteaInput{
Expand All @@ -262,6 +267,9 @@ var _ = BeforeSuite(func() {
AuthSecretName: e2e.AuthSecretName,
Username: e2eConfig.GetVariable(e2e.GiteaUserNameVar),
Password: e2eConfig.GetVariable(e2e.GiteaUserPasswordVar),
ServiceType: giteaServiceType,
CustomIngressConfig: e2e.GiteaIngress,
Variables: e2eConfig.Variables,
})
})

Expand Down

0 comments on commit 9a7fcfe

Please sign in to comment.