class_docstr: Tests webserver deployment.
class_docstr_tok: ["Tests","webserver","deployment","."]
code: def test_webserver_resources_are_configurable(self):
      docs = render_chart(
          values={
              "webserver": {
                  "resources": {
                      "limits": {"cpu": "200m", "memory": "128Mi"},
                      "requests": {"cpu": "300m", "memory": "169Mi"},
                  }
              },
          },
          show_only=["templates/webserver/webserver-deployment.yaml"],
      )
      assert "128Mi" == jmespath.search(
          "spec.template.spec.containers[0].resources.limits.memory",
          docs[0],
      )
      assert "200m" == jmespath.search(
          "spec.template.spec.containers[0].resources.limits.cpu",
          docs[0],
      )
  
      assert "169Mi" == jmespath.search(
          "spec.template.spec.containers[0].resources.requests.memory",
          docs[0],
      )
      assert "300m" == jmespath.search(
          "spec.template.spec.containers[0].resources.requests.cpu",
          docs[0],
      )
  
      # initContainer wait-for-airflow-migrations
      assert "128Mi" == jmespath.search(
          "spec.template.spec.initContainers[0].resources.limits.memory",
          docs[0],
      )
      assert "200m" == jmespath.search(
          "spec.template.spec.initContainers[0].resources.limits.cpu",
          docs[0],
      )
  
      assert "169Mi" == jmespath.search(
          "spec.template.spec.initContainers[0].resources.requests.memory",
          docs[0],
      )
      assert "300m" == jmespath.search(
          "spec.template.spec.initContainers[0].resources.requests.cpu",
          docs[0],
      )
  
imports: from __future__ import annotations
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 23 for calling the TestWebserverDeployment obj's underlying member method code with example usage: obj.test_webserver_resources_are_configurable() without return types