class_docstr: Tests worker.
class_docstr_tok: ["Tests","worker","."]
code: def test_should_add_extra_volume_and_extra_volume_mount(self):
      docs = render_chart(
          values={
              "executor": "CeleryExecutor",
              "workers": {
                  "extraVolumes": [
                      {
                          "name": "test-volume-{{ .Chart.Name }}",
                          "emptyDir": {},
                      }
                  ],
                  "extraVolumeMounts": [
                      {
                          "name": "test-volume-{{ .Chart.Name }}",
                          "mountPath": "/opt/test",
                      }
                  ],
              },
          },
          show_only=["templates/workers/worker-deployment.yaml"],
      )
  
      assert "test-volume-airflow" == jmespath.search(
          "spec.template.spec.volumes[0].name", docs[0]
      )
      assert "test-volume-airflow" == jmespath.search(
          "spec.template.spec.containers[0].volumeMounts[0].name",
          docs[0],
      )
      assert "test-volume-airflow" == jmespath.search(
          "spec.template.spec.initContainers[0].volumeMounts[-1].name",
          docs[0],
      )
  
imports: from __future__ import annotations
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
  from tests.charts.log_groomer import LogGroomerTestBase
label_desc: Use image node_id 6 for calling the TestWorker obj's underlying member method code with example usage: obj.test_should_add_extra_volume_and_extra_volume_mount() without return types