Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): squash helm tests (backport of #11901) #12310

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test(e2e): squash helm tests (#11901)
Speed up CI

test/e2e/helm/kuma_helm_deploy_multi_apps.go was testing
1) HELM standalone deployment with CNI
2) Autoscaling of the CP (by checking minimum replicas)

1) Is tested in multiple places including
test/e2e/bootstrap/corefile_template.go
I just added 2) to existing test to save time

---------

Signed-off-by: Jakub Dyszkiewicz <[email protected]>
  • Loading branch information
jakubdyszkiewicz authored and kumahq[bot] committed Dec 17, 2024
commit b1833c03ae435378ecdf46b4e2f482ad533581a8
8 changes: 8 additions & 0 deletions test/e2e/bootstrap/corefile_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bootstrap

import (
"fmt"
"strconv"
"strings"

"github.com/gruntwork-io/terratest/modules/random"
Expand Down Expand Up @@ -35,6 +36,7 @@ data:
}

dnsConfigDir := "/tmp/kuma-dp-config/coredns"
minReplicas := 3
BeforeAll(func() {
k8sCluster = NewK8sCluster(NewTestingT(), Kuma1, Silent)

Expand All @@ -49,6 +51,8 @@ data:
WithHelmOpt("controlPlane.extraConfigMaps[0].name", configMapName),
WithHelmOpt("controlPlane.extraConfigMaps[0].mountPath", dnsConfigDir),
WithHelmOpt("controlPlane.extraConfigMaps[0].readonly", "false"),
WithHelmOpt("controlPlane.autoscaling.enabled", "true"),
WithHelmOpt("controlPlane.autoscaling.minReplicas", strconv.Itoa(minReplicas)),
)).
Install(MeshKubernetes("default")).
Install(NamespaceWithSidecarInjection(appNamespace)).
Expand All @@ -69,6 +73,10 @@ data:
Expect(k8sCluster.DismissCluster()).To(Succeed())
})

It("should deploy 3 CP replicas", func() {
Expect(k8sCluster.WaitApp(Config.KumaServiceName, Config.KumaNamespace, minReplicas)).To(Succeed())
})

It("should use Corefile template from control plane at data plane", func() {
dpPod, err := PodNameOfApp(k8sCluster, appName, appNamespace)
Expect(err).ToNot(HaveOccurred())
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/helm/e2e_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package helm_test

Check failure on line 1 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

: # github.com/kumahq/kuma/test/e2e/helm_test [github.com/kumahq/kuma/test/e2e/helm.test]

import (
"testing"
Expand All @@ -18,8 +18,14 @@
_ = Describe("Test Zone and Global universal mode with Helm chart", Label("job-0"), helm.ZoneAndGlobalInUniversalModeWithHelmChart, Ordered)
// Skipped as it fails with: error while running command: exit status 1; Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ServiceAccount "kuma-control-plane" in namespace "kuma-system" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "kuma-c0vo8o": current value is "kuma-8yy3uv"
// Likely something needs to be improved to be able to run this test
<<<<<<< HEAD

Check failure on line 21 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected <<, expected name

Check failure on line 21 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

expected 'IDENT', found '<<' (typecheck)
_ = PDescribe("Test Global and Zone universal mode with Helm chart", Label("job-0"), helm.GlobalAndZoneInUniversalModeWithHelmChart, Ordered)
_ = Describe("Test App deployment with Helm chart", Label("job-2"), helm.AppDeploymentWithHelmChart)
_ = Describe("Test upgrading Standalone with Helm chart", Label("job-2"), helm.UpgradingWithHelmChartStandalone, Ordered)
_ = Describe("Test upgrading Multizone with Helm chart", Label("job-2"), helm.UpgradingWithHelmChartMultizone, Ordered)
=======

Check failure on line 26 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected ==, expected name

Check failure on line 26 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

expected 'IDENT', found '==' (typecheck)
_ = PDescribe("Global and Zone universal mode with Helm chart", Label("job-0"), helm.GlobalAndZoneInUniversalModeWithHelmChart, Ordered)

Check failure on line 27 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected comma in grouped declaration; possibly missing semicolon or newline or )

Check failure on line 27 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

expected ';', found ',' (typecheck)
_ = Describe("Upgrade Standalone with Helm", Label("job-0"), helm.UpgradingWithHelmChartStandalone, Ordered)

Check failure on line 28 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

expected declaration, found _ (typecheck)
_ = Describe("Upgrade Multizone with Helm", Label("job-2"), helm.UpgradingWithHelmChartMultizone, Ordered)
>>>>>>> a649d8ebd (test(e2e): squash helm tests (#11901))

Check failure on line 30 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

invalid character U+0023 '#' (typecheck)

Check failure on line 30 in test/e2e/helm/e2e_suite_test.go

View workflow job for this annotation

GitHub Actions / check

illegal character U+0023 '#' (typecheck)
)
87 changes: 0 additions & 87 deletions test/e2e/helm/kuma_helm_deploy_multi_apps.go

This file was deleted.

Loading