apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: "[Stable] AlertingRule" crd: 0000_50_monitoring_01_alertingrules.crd.yaml tests: onCreate: - name: Should be able to create a minimal AlertingRule initial: | apiVersion: monitoring.openshift.io/v1 kind: AlertingRule spec: groups: - name: foo rules: - alert: foo expr: foo expected: | apiVersion: monitoring.openshift.io/v1 kind: AlertingRule spec: groups: - name: foo rules: - alert: foo expr: foo - name: Rule groups must not be empty initial: | apiVersion: monitoring.openshift.io/v1 kind: AlertingRule spec: groups: [] expectedError: "Invalid value: 0: spec.groups in body should have at least 1 items"