suite: test alertmanager
templates:
  - alertmanager/alertmanager.yaml
tests:
  # 1417
  - it: should be empty if alertmanager is not enabled
    set:
      alertmanager.enabled: false
      alertmanager.alertmanagerSpec.clusterAdvertiseAddress: xxx
    asserts:
      - hasDocuments:
          count: 0
  # 1572
  - it: should have tolerations if affinity is not set
    set:
      alertmanager.alertmanagerSpec.tolerations:
        - key: "key1"
          operator: "Equal"
          value: "value1"
          effect: "NoSchedule"
    asserts:
      - hasDocuments:
          count: 1
      - equal:
          path: spec.tolerations[0].key
          value: key1
