Skip to content

Commit

Permalink
fix(acceptance): Remove smoke test label from cf_metadata_test
Browse files Browse the repository at this point in the history
# Issue

The test cases `cf_metadata_test` were marked with the smoke test
labels.

This is not warranted, as smoke tests should be minimal.

# Fix

Remove the label.

# Note

Simplified test as well.

Co-authored-by: Josua Geiger <[email protected]>
  • Loading branch information
silvestre and geigerj0 committed May 29, 2024
1 parent 9ece337 commit 5bb46fb
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions src/acceptance/app/cf_metadata_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package app_test

import (
"acceptance"
. "acceptance/helpers"
"time"

Expand All @@ -24,26 +23,15 @@ var _ = Describe("AutoScaler CF metadata support", func() {
})
AfterEach(AppAfterEach)

Context("when scaling by custom metrics", func() {
It("should scale out normally", Label(acceptance.LabelSmokeTests), func() {
By("Scale out to 2 instances")
When("the label app-autoscaler.cloudfoundry.org/disable-autoscaling is set", func() {
It("should not scale out", func() {
By("Set the label app-autoscaler.cloudfoundry.org/disable-autoscaling to true")
SetLabel(cfg, appGUID, "app-autoscaler.cloudfoundry.org/disable-autoscaling", "true")
scaleOut := sendMetricToAutoscaler(cfg, appGUID, appName, 550, true)
Eventually(scaleOut).
Consistently(scaleOut).
WithTimeout(5 * time.Minute).
WithPolling(15 * time.Second).
Should(Equal(2))
})

Context("when the label app-autoscaler.cloudfoundry.org/disable-autoscaling is set", func() {
It("should not scale out", Label(acceptance.LabelSmokeTests), func() {
By("Set the label app-autoscaler.cloudfoundry.org/disable-autoscaling to true")
SetLabel(cfg, appGUID, "app-autoscaler.cloudfoundry.org/disable-autoscaling", "true")
scaleOut := sendMetricToAutoscaler(cfg, appGUID, appName, 550, true)
Consistently(scaleOut).
WithTimeout(5 * time.Minute).
WithPolling(15 * time.Second).
Should(Equal(1))
})
Should(Equal(1))
})
})
})

0 comments on commit 5bb46fb

Please sign in to comment.