class_docstr: Tests PgBouncer.
class_docstr_tok: ["Tests","PgBouncer","."]
code: def test_should_create_pgbouncer_service(self):
      docs = render_chart(
          values={"pgbouncer": {"enabled": True}},
          show_only=["templates/pgbouncer/pgbouncer-service.yaml"],
      )
  
      assert "Service" == jmespath.search("kind", docs[0])
      assert "release-name-pgbouncer" == jmespath.search(
          "metadata.name", docs[0]
      )
      assert "true" == jmespath.search(
          'metadata.annotations."prometheus.io/scrape"', docs[0]
      )
      assert "9127" == jmespath.search(
          'metadata.annotations."prometheus.io/port"', docs[0]
      )
  
      assert {
          "prometheus.io/scrape": "true",
          "prometheus.io/port": "9127",
      } == jmespath.search("metadata.annotations", docs[0])
  
      assert {
          "name": "pgbouncer",
          "protocol": "TCP",
          "port": 6543,
      } in jmespath.search("spec.ports", docs[0])
      assert {
          "name": "pgbouncer-metrics",
          "protocol": "TCP",
          "port": 9127,
      } in jmespath.search("spec.ports", docs[0])
  
imports: from __future__ import annotations
  import base64
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 3 for calling the TestPgbouncer obj's underlying member method code with example usage: obj.test_should_create_pgbouncer_service() without return types