Skip to content

Commit

Permalink
Make sure the ksvc is not scaled down
Browse files Browse the repository at this point in the history
  • Loading branch information
mgencur committed May 2, 2024
1 parent 5e52680 commit 1fcf8ba
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
pkgTest "knative.dev/pkg/test"
"knative.dev/pkg/test/spoof"
"knative.dev/serving/pkg/apis/autoscaling"
v1 "knative.dev/serving/pkg/apis/serving/v1"
"knative.dev/serving/pkg/resources"
rtesting "knative.dev/serving/pkg/testing/v1"
"knative.dev/serving/test"
"knative.dev/serving/test/e2e"
v1test "knative.dev/serving/test/v1"
Expand Down Expand Up @@ -300,7 +302,10 @@ func TestMultiContainerProbeStartFailing(t *testing.T) {

objects, err := v1test.CreateServiceReady(t, clients, &names, func(svc *v1.Service) {
svc.Spec.Template.Spec.Containers = containers
})
}, rtesting.WithConfigAnnotations(map[string]string{
// Make sure we don't scale to zero during the test.
autoscaling.MinScaleAnnotationKey: "1",
}))
if err != nil {
t.Fatalf("Failed to create initial Service: %v: %v", names.Service, err)
}
Expand Down

0 comments on commit 1fcf8ba

Please sign in to comment.