diff --git a/pkg/health/health_test.go b/pkg/health/health_test.go index 13118be55..f19469ac6 100644 --- a/pkg/health/health_test.go +++ b/pkg/health/health_test.go @@ -87,7 +87,7 @@ func TestHPA(t *testing.T) { assertAppHealth(t, "./testdata/hpa-v2beta1-healthy-disabled.yaml", HealthStatusHealthy) assertAppHealth(t, "./testdata/hpa-v2beta1-healthy.yaml", HealthStatusHealthy) assertAppHealth(t, "./testdata/hpa-v1-degraded.yaml", HealthStatusDegraded) - assertAppHealth(t, "./testdata/hpa-v1-healthy.yaml", HealthStatusHealthy) + assertAppHealth(t, "./testdata/hpa-v1-degraded-partially.yaml", HealthStatusDegraded) assertAppHealth(t, "./testdata/hpa-v1-healthy-toofew.yaml", HealthStatusHealthy) assertAppHealth(t, "./testdata/hpa-v1-progressing.yaml", HealthStatusProgressing) assertAppHealth(t, "./testdata/hpa-v1-progressing-with-no-annotations.yaml", HealthStatusProgressing) diff --git a/pkg/health/testdata/hpa-v1-healthy.yaml b/pkg/health/testdata/hpa-v1-degraded-partially.yaml similarity index 100% rename from pkg/health/testdata/hpa-v1-healthy.yaml rename to pkg/health/testdata/hpa-v1-degraded-partially.yaml diff --git a/pkg/health/testdata/hpa-v2-degraded-partially.yaml b/pkg/health/testdata/hpa-v2-degraded-partially.yaml index 4bd74b1b2..a9040b5d3 100644 --- a/pkg/health/testdata/hpa-v2-degraded-partially.yaml +++ b/pkg/health/testdata/hpa-v2-degraded-partially.yaml @@ -14,21 +14,21 @@ spec: targetCPUUtilizationPercentage: 80 status: conditions: - - lastTransitionTime: '2024-09-05T20:20:41Z' - message: the HPA controller was able to get the target's current scale - reason: SucceededGetScale - status: 'True' - type: AbleToScale - - lastTransitionTime: '2024-09-05T20:20:56Z' - message: >- - the HPA was unable to compute the replica count: failed to get memory - utilization: unable to get metrics for resource memory: unable to fetch - metrics from resource metrics API: the server could not find the - requested resource (get pods.metrics.k8s.io) - reason: FailedGetResourceMetric - status: 'False' - type: ScalingActive - type: ScalingLimited + - lastTransitionTime: '2024-09-05T20:20:41Z' + message: the HPA controller was able to get the target's current scale + reason: SucceededGetScale + status: 'True' + type: AbleToScale + - lastTransitionTime: '2024-09-05T20:20:56Z' + message: | + the HPA was unable to compute the replica count: failed to get memory + utilization: unable to get metrics for resource memory: unable to fetch + metrics from resource metrics API: the server could not find the + requested resource (get pods.metrics.k8s.io) + reason: FailedGetResourceMetric + status: 'False' + type: ScalingActive + type: ScalingLimited currentMetrics: - resource: current: