mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
An empty selector matches every Pod, PVC, Service and DataVolume in the namespace, so one such monitor goes non-operational on any import there. No chart renders one, but the schema marked the field required without requiring any label, and the API accepted it. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
16 lines
492 B
YAML
16 lines
492 B
YAML
suite: WorkloadMonitor CRD
|
|
templates:
|
|
- templates/crds/crds.yaml
|
|
|
|
# An empty selector matches every object of each watched kind in the
|
|
# namespace, DataVolumes included, so the API refuses one.
|
|
tests:
|
|
- it: requires at least one selector label
|
|
documentSelector:
|
|
path: metadata.name
|
|
value: workloadmonitors.cozystack.io
|
|
asserts:
|
|
- equal:
|
|
path: spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.selector.minProperties
|
|
value: 1
|