Skip to content

Commit

Permalink
fix for custom metrics test via mTLS
Browse files Browse the repository at this point in the history
  • Loading branch information
asalan316 committed Mar 11, 2024
1 parent 607aa5a commit 53513cb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/acceptance/app/custom_metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,22 @@ var _ = Describe("AutoScaler custom metrics policy", func() {
GinkgoWriter.Println("")
})
})

Context("when scaling by custom metrics via mtls", func() {
It("should scale out and scale in", Label(acceptance.LabelSmokeTests), func() {
By("Scale out to 2 instances")
scaleOut := func() (int, error) {
SendMetricMTLS(cfg, appName, 550)
return RunningInstances(appGUID, 5*time.Second)
}
Eventually(scaleOut, 5*time.Minute, 15*time.Second).Should(Equal(2))

By("Scale in to 1 instance")
scaleIn := func() (int, error) {
SendMetricMTLS(cfg, appName, 100)
return RunningInstances(appGUID, 5*time.Second)
}
Eventually(scaleIn, 5*time.Minute, 15*time.Second).Should(Equal(1))
})
})
})

0 comments on commit 53513cb

Please sign in to comment.