class_docstr: Tests worker service account.
class_docstr_tok: ["Tests","worker","service","account","."]
code: def test_should_create_worker_service_account_for_specific_executors(
      self, executor, creates_service_account
  ):
      docs = render_chart(
          values={
              "executor": executor,
              "workers": {
                  "serviceAccount": {"create": True},
                  "labels": {"test_label": "test_label_value"},
              },
          },
          show_only=["templates/workers/worker-serviceaccount.yaml"],
      )
      if creates_service_account:
          assert jmespath.search("kind", docs[0]) == "ServiceAccount"
          assert "test_label" in jmespath.search(
              "metadata.labels", docs[0]
          )
          assert (
              jmespath.search("metadata.labels", docs[0])["test_label"]
              == "test_label_value"
          )
      else:
          assert docs == []
  
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 2 for calling the TestWorkerServiceAccount obj's underlying member method code with example usage: obj.test_should_create_worker_service_account_for_specific_executors(executor, creates_service_account) without return types