...

Text file src/github.com/openshift/api/monitoring/v1/stable.alertingrule.testsuite.yaml

Documentation: github.com/openshift/api/monitoring/v1

     1apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
     2name: "[Stable] AlertingRule"
     3crd: 0000_50_monitoring_01_alertingrules.crd.yaml
     4tests:
     5  onCreate:
     6  - name: Should be able to create a minimal AlertingRule
     7    initial: |
     8      apiVersion: monitoring.openshift.io/v1
     9      kind: AlertingRule
    10      spec:
    11        groups:
    12        - name: foo
    13          rules:
    14          - alert: foo
    15            expr: foo
    16    expected: |
    17      apiVersion: monitoring.openshift.io/v1
    18      kind: AlertingRule
    19      spec:
    20        groups:
    21        - name: foo
    22          rules:
    23          - alert: foo
    24            expr: foo
    25  - name: Rule groups must not be empty
    26    initial: |
    27      apiVersion: monitoring.openshift.io/v1
    28      kind: AlertingRule
    29      spec:
    30        groups: []
    31    expectedError: "Invalid value: 0: spec.groups in body should have at least 1 items"

View as plain text