suite: PodDisruptionBudget tests
templates:
  - templates/pdb.yaml
tests:
  - it: should not create PDB with single replica
    set:
      replicaCount: 1
    asserts:
      - hasDocuments:
          count: 0

  - it: should create PDB with multiple replicas
    set:
      replicaCount: 2
    asserts:
      - hasDocuments:
          count: 1
      - isKind:
          of: PodDisruptionBudget
      - equal:
          path: spec.minAvailable
          value: 1

  - it: should create PDB with 3 replicas
    set:
      replicaCount: 3
    asserts:
      - hasDocuments:
          count: 1
      - isKind:
          of: PodDisruptionBudget
      - equal:
          path: metadata.name
          value: RELEASE-NAME-fuellhorn
