class_docstr: Tests cleanup of pods.
class_docstr_tok: ["Tests","cleanup","of","pods","."]
code: def test_should_create_cronjob_for_enabled_cleanup(self):
      docs = render_chart(
          values={
              "cleanup": {"enabled": True},
          },
          show_only=["templates/cleanup/cleanup-cronjob.yaml"],
      )
  
      assert "airflow-cleanup-pods" == jmespath.search(
          "spec.jobTemplate.spec.template.spec.containers[0].name",
          docs[0],
      )
      assert jmespath.search(
          "spec.jobTemplate.spec.template.spec.containers[0].image",
          docs[0],
      ).startswith("apache/airflow")
      assert {
          "name": "config",
          "configMap": {"name": "release-name-config"},
      } in jmespath.search(
          "spec.jobTemplate.spec.template.spec.volumes", docs[0]
      )
      assert {
          "name": "config",
          "mountPath": "/opt/airflow/airflow.cfg",
          "subPath": "airflow.cfg",
          "readOnly": True,
      } in jmespath.search(
          "spec.jobTemplate.spec.template.spec.containers[0].volumeMounts",
          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 1 for calling the TestCleanupPods obj's underlying member method code with example usage: obj.test_should_create_cronjob_for_enabled_cleanup() without return types