class_docstr: Tests statsd.
class_docstr_tok: ["Tests","statsd","."]
code: def test_should_add_volume_and_volume_mount_when_exist_extra_mappings(
      self,
  ):
      extra_mapping = {
          "match": "airflow.pool.queued_slots.*",
          "name": "airflow_pool_queued_slots",
          "labels": {"pool": "$1"},
      }
      docs = render_chart(
          values={
              "statsd": {
                  "enabled": True,
                  "extraMappings": [extra_mapping],
              }
          },
          show_only=["templates/statsd/statsd-deployment.yaml"],
      )
  
      assert {
          "name": "config",
          "configMap": {"name": "release-name-statsd"},
      } in jmespath.search("spec.template.spec.volumes", docs[0])
  
      assert {
          "name": "config",
          "mountPath": "/etc/statsd-exporter/mappings.yml",
          "subPath": "mappings.yml",
      } in jmespath.search(
          "spec.template.spec.containers[0].volumeMounts", docs[0]
      )
  
imports: from __future__ import annotations
  import jmespath
  import pytest
  import yaml
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 2 for calling the TestStatsd obj's underlying member method code with example usage: obj.test_should_add_volume_and_volume_mount_when_exist_extra_mappings() without return types