diff --git a/src/autoscaler/api/config/config_test.go b/src/autoscaler/api/config/config_test.go index 3674cb7b9b..737eba217c 100644 --- a/src/autoscaler/api/config/config_test.go +++ b/src/autoscaler/api/config/config_test.go @@ -4,6 +4,7 @@ import ( "bytes" "time" + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/routes" . "code.cloudfoundry.org/app-autoscaler/src/autoscaler/testhelpers" . "code.cloudfoundry.org/app-autoscaler/src/autoscaler/api/config" @@ -257,6 +258,11 @@ rate_limit: conf.RateLimit.ValidDuration = 1 * time.Second conf.CredHelperImpl = "path/to/plugin" + + conf.Health = models.HealthConfig{ + UnprotectedEndpoints: []string{"/", routes.LivenessPath, + routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}, + } }) JustBeforeEach(func() { err = conf.Validate() diff --git a/src/autoscaler/integration/components_test.go b/src/autoscaler/integration/components_test.go index 121c93d77c..240b788fb2 100644 --- a/src/autoscaler/integration/components_test.go +++ b/src/autoscaler/integration/components_test.go @@ -215,7 +215,7 @@ func (components *Components) PrepareGolangApiServerConfig(dbURI string, publicA Level: LOGLEVEL, }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, PublicApiServer: apiConfig.ServerConfig{ Port: publicApiPort, @@ -396,7 +396,7 @@ func (components *Components) PrepareEventGeneratorConfig(dbUri string, port int Level: LOGLEVEL, }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, Server: egConfig.ServerConfig{ Port: port, @@ -461,7 +461,7 @@ func (components *Components) PrepareScalingEngineConfig(dbURI string, port int, Secret: "admin", }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, Server: seConfig.ServerConfig{ Port: port, @@ -499,7 +499,7 @@ func (components *Components) PrepareOperatorConfig(dbURI string, ccUAAURL strin Level: LOGLEVEL, }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, CF: cf.Config{ API: ccUAAURL, @@ -569,7 +569,7 @@ func (components *Components) PrepareMetricsGatewayConfig(dbURI string, metricSe Level: LOGLEVEL, }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, EnvelopChanSize: 500, NozzleCount: 1, @@ -615,7 +615,7 @@ func (components *Components) PrepareMetricsServerConfig(dbURI string, httpClien Level: LOGLEVEL, }, Health: models.HealthConfig{ - UnprotectedEndpoints: []string{"", routes.LivenessPath, + UnprotectedEndpoints: []string{"/", routes.LivenessPath, routes.ReadinessPath, routes.PrometheusPath, routes.PprofPath}}, HttpClientTimeout: httpClientTimeout, NodeAddrs: []string{"localhost"}, diff --git a/src/autoscaler/integration/integration_operator_others_test.go b/src/autoscaler/integration/integration_operator_others_test.go index 4998a7c8d1..4dcd48d463 100644 --- a/src/autoscaler/integration/integration_operator_others_test.go +++ b/src/autoscaler/integration/integration_operator_others_test.go @@ -51,7 +51,11 @@ var _ = Describe("Integration_Operator_Others", func() { }) JustBeforeEach(func() { - operatorConfPath = components.PrepareOperatorConfig(dbUrl, fakeCCNOAAUAA.URL(), fmt.Sprintf("https://127.0.0.1:%d", components.Ports[ScalingEngine]), fmt.Sprintf("https://127.0.0.1:%d", components.Ports[Scheduler]), 10*time.Second, 1*24*time.Hour, defaultHttpClientTimeout, tmpDir) + operatorConfPath = components.PrepareOperatorConfig( + dbUrl, fakeCCNOAAUAA.URL(), fmt.Sprintf("https://127.0.0.1:%d", + components.Ports[ScalingEngine]), + fmt.Sprintf("https://127.0.0.1:%d", components.Ports[Scheduler]), + 10*time.Second, 1*24*time.Hour, defaultHttpClientTimeout, tmpDir) startOperator() })