class_docstr: Tests HPA.
docstr: Verify minimum and maximum replicas.
code: def test_min_max_replicas(self, min_replicas, max_replicas):
      """Verify minimum and maximum replicas."""
      docs = render_chart(
          values={
              "workers": {
                  "hpa": {
                      "enabled": True,
                      **(
                          {"minReplicaCount": min_replicas}
                          if min_replicas
                          else {}
                      ),
                      **(
                          {"maxReplicaCount": max_replicas}
                          if max_replicas
                          else {}
                      ),
                  }
              },
          },
          show_only=["templates/workers/worker-hpa.yaml"],
      )
      assert (
          jmespath.search("spec.minReplicas", docs[0]) == 0
          if min_replicas is None
          else min_replicas
      )
      assert (
          jmespath.search("spec.maxReplicas", docs[0]) == 5
          if max_replicas is None
          else max_replicas
      )
  
file_path: airflow/helm_tests/other/test_hpa.py
imports: from __future__ import annotations
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 3 for calling the TestHPA obj's underlying member method code with example usage: obj.test_min_max_replicas(min_replicas, max_replicas) without return types