class_docstr: Tests scheduler.
class_docstr_tok: ["Tests","scheduler","."]
code: def test_scheduler_security_contexts_are_configurable(self):
      docs = render_chart(
          values={
              "scheduler": {
                  "securityContexts": {
                      "pod": {
                          "fsGroup": 1000,
                          "runAsGroup": 1001,
                          "runAsNonRoot": True,
                          "runAsUser": 2000,
                      },
                      "container": {
                          "allowPrivilegeEscalation": False,
                          "readOnlyRootFilesystem": True,
                      },
                  }
              },
          },
          show_only=["templates/scheduler/scheduler-deployment.yaml"],
      )
      assert {
          "allowPrivilegeEscalation": False,
          "readOnlyRootFilesystem": True,
      } == jmespath.search(
          "spec.template.spec.containers[0].securityContext", docs[0]
      )
  
      assert {
          "runAsUser": 2000,
          "runAsGroup": 1001,
          "fsGroup": 1000,
          "runAsNonRoot": True,
      } == jmespath.search(
          "spec.template.spec.securityContext", 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 20 for calling the TestScheduler obj's underlying member method code with example usage: obj.test_scheduler_security_contexts_are_configurable() without return types