From 5bb46fbd44f14095e4bf67eb4f58bbe7425141c2 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Wed, 29 May 2024 14:44:42 +0200 Subject: [PATCH] fix(acceptance): Remove smoke test label from `cf_metadata_test` # 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 --- src/acceptance/app/cf_metadata_test.go | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/acceptance/app/cf_metadata_test.go b/src/acceptance/app/cf_metadata_test.go index c098b9d1dc..4683f454df 100644 --- a/src/acceptance/app/cf_metadata_test.go +++ b/src/acceptance/app/cf_metadata_test.go @@ -1,7 +1,6 @@ package app_test import ( - "acceptance" . "acceptance/helpers" "time" @@ -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)) }) }) })