Add test validating using CRD that misses explicit draft version

This commit is contained in:
Yann Hamon 2023-07-16 09:39:52 +02:00
parent 51065ea828
commit a2ad239853
2 changed files with 18 additions and 0 deletions

View file

@ -340,3 +340,8 @@ resetCacheFolder() {
run xmllint --noout --schema fixtures/junit.xsd output.xml
[ "$status" -eq 0 ]
}
@test "passes when trying to use a CRD that does not have the JSONSchema set" {
run bash -c "bin/kubeconform -schema-location default -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' fixtures/httpproxy.yaml"
[ "$status" -eq 0 ]
}

13
fixtures/httpproxy.yaml Normal file
View file

@ -0,0 +1,13 @@
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: basic
spec:
virtualhost:
fqdn: foo-basic.example.com
routes:
- conditions:
- prefix: /
services:
- name: s1
port: 80