Skip to content

Commit

Permalink
Fix helm test
Browse files Browse the repository at this point in the history
* Use http endpoint instead of https endpoint for helm e2e tests.
* Delete curl pod from tc Namespace properly.

Signed-off-by: Neo2308 <[email protected]>
  • Loading branch information
Neo2308 authored and acornett21 committed Oct 30, 2024
1 parent 82e0613 commit 7773246
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/e2e/go/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var _ = Describe("operator-sdk", func() {

AfterEach(func() {
By("deleting curl pod")
testutils.WrapWarnOutput(tc.Kubectl.Delete(false, "pod", "curl"))
testutils.WrapWarnOutput(tc.Kubectl.Delete(true, "pod", "curl"))

By("cleaning up permissions")
testutils.WrapWarnOutput(tc.Kubectl.Command("delete", "clusterrolebinding", metricsClusterRoleBindingName))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/helm/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var _ = Describe("Running Helm projects", func() {

AfterEach(func() {
By("deleting curl pod")
testutils.WrapWarnOutput(tc.Kubectl.Delete(false, "pod", "curl"))
testutils.WrapWarnOutput(tc.Kubectl.Delete(true, "pod", "curl"))

By("deleting test CR instances")
testutils.WrapWarnOutput(tc.Kubectl.Delete(false, "-f", memcachedSampleFile))
Expand Down Expand Up @@ -232,7 +232,7 @@ var _ = Describe("Running Helm projects", func() {
cmdOpts := []string{
"run", "curl", "--image=curlimages/curl:7.68.0", "--restart=OnFailure", "--",
"curl", "-v", "-k", "-H", fmt.Sprintf(`Authorization: Bearer %s`, token),
fmt.Sprintf("https://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),
fmt.Sprintf("http://%s-controller-manager-metrics-service.%s.svc:8443/metrics", tc.ProjectName, tc.Kubectl.Namespace),
}
_, err = tc.Kubectl.CommandInNamespace(cmdOpts...)
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit 7773246

Please sign in to comment.