Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jirka Kremser <[email protected]>
  • Loading branch information
jkremser committed Jan 21, 2025
1 parent 05b2ea9 commit cd7dbfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions e2e-tests/podinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _ = Describe("Helm chart:", func() {
Expect(err).NotTo(HaveOccurred())
_, err = execCmdOE("helm dependency build", pwd+"/../helmchart/otel-add-on")
Expect(err).NotTo(HaveOccurred())
cmd := "helm upgrade -i kedify-otel ../helmchart/otel-add-on -f ./testdata/scaler-values.yaml"
cmd := "helm upgrade -i kedify-otel ../helmchart/otel-add-on --namespace keda --create-namespace -f ./testdata/scaler-values.yaml"
if len(otelScalerVersion) > 0 {
cmd += fmt.Sprintf(" --set image.tag=%s", otelScalerVersion)
}
Expand All @@ -110,7 +110,7 @@ var _ = Describe("Helm chart:", func() {
})
When("kedify-otel installed", func() {
It("should become ready", func() {
waitForDeployment("otel-add-on-scaler", "default", defaultTimeoutSec)
waitForDeployment("otel-add-on-scaler", "keda", defaultTimeoutSec)
})
})
Context("Scaled Object", func() {
Expand Down Expand Up @@ -154,7 +154,7 @@ var _ = Describe("Helm chart:", func() {
Should(Succeed())
})
time.Sleep(5 * time.Second)
ctx2min, _ := context.WithTimeout(context.TODO(), 4*time.Minute)
ctx5min, _ := context.WithTimeout(context.TODO(), 5*time.Minute)
It("should eventually scale the podinfo back from N -> 1", func() {
Eventually(func(g Gomega) {
out, err := kubectl("get hpa keda-hpa-podinfo-pull-example -ojsonpath='{.status.desiredReplicas}'")
Expand All @@ -163,7 +163,7 @@ var _ = Describe("Helm chart:", func() {
g.Expect(err).Should(Not(HaveOccurred()))
g.Expect(desiredReplicas).Should(Equal(minReplicas))
ctx.t.Logf(" ->>> Pod info successfuly scaled back to %d <<<-\n\n\n", desiredReplicas)
}).WithPolling(3 * time.Second).WithContext(ctx2min).Should(Succeed())
}).WithPolling(3 * time.Second).WithContext(ctx5min).Should(Succeed())
})
})
})
Expand All @@ -186,7 +186,7 @@ func PrintLogs() {
wrapInSection("HPA", "get hpa keda-hpa-podinfo-pull-example -oyaml")
wrapInSection("SO", "get so podinfo-pull-example -oyaml")
wrapInSection("PODS", "get pods -A")
for _, nameAndNs := range []string{"podinfo -ndefault", "keda-operator -nkeda", "opentelemetry-collector -ndefault", "otel-add-on -ndefault"} {
for _, nameAndNs := range []string{"podinfo -ndefault", "keda-operator -nkeda", "opentelemetry-collector -nkeda", "otel-add-on -nkeda"} {
wrapInSection(fmt.Sprintf("Logs for %s", nameAndNs), fmt.Sprintf("logs -lapp.kubernetes.io/name=%s --tail=-1", nameAndNs))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ opentelemetry-collector:
target_label: pod_name
exporters:
otlp:
endpoint: keda-otel-scaler:4317
endpoint: keda-otel-scaler.keda.svc:4317
compression: "none"
tls:
insecure: true
Expand Down

0 comments on commit cd7dbfb

Please sign in to comment.