class_docstr: Tests pod template file.
class_docstr_tok: ["Tests","pod","template","file","."]
code: def test_should_set_username_and_pass_env_variables(self):
      docs = render_chart(
          values={
              "dags": {
                  "gitSync": {
                      "enabled": True,
                      "credentialsSecret": "user-pass-secret",
                      "sshKeySecret": None,
                  }
              }
          },
          show_only=["templates/pod-template-file.yaml"],
          chart_dir=self.temp_chart_dir,
      )
  
      assert {
          "name": "GIT_SYNC_USERNAME",
          "valueFrom": {
              "secretKeyRef": {
                  "name": "user-pass-secret",
                  "key": "GIT_SYNC_USERNAME",
              }
          },
      } in jmespath.search("spec.initContainers[0].env", docs[0])
      assert {
          "name": "GIT_SYNC_PASSWORD",
          "valueFrom": {
              "secretKeyRef": {
                  "name": "user-pass-secret",
                  "key": "GIT_SYNC_PASSWORD",
              }
          },
      } in jmespath.search("spec.initContainers[0].env", docs[0])
  
      # Testing git-sync v4
      assert {
          "name": "GITSYNC_USERNAME",
          "valueFrom": {
              "secretKeyRef": {
                  "name": "user-pass-secret",
                  "key": "GITSYNC_USERNAME",
              }
          },
      } in jmespath.search("spec.initContainers[0].env", docs[0])
      assert {
          "name": "GITSYNC_PASSWORD",
          "valueFrom": {
              "secretKeyRef": {
                  "name": "user-pass-secret",
                  "key": "GITSYNC_PASSWORD",
              }
          },
      } in jmespath.search("spec.initContainers[0].env", docs[0])
  
imports: from __future__ import annotations
  import re
  from pathlib import Path
  from shutil import copyfile, copytree
  from tempfile import TemporaryDirectory
  import jmespath
  import pytest
  from helm_tests.airflow_aux.test_container_lifecycle import CONTAINER_LIFECYCLE_PARAMETERS
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 8 for calling the TestPodTemplateFile obj's underlying member method code with example usage: obj.test_should_set_username_and_pass_env_variables() without return types