Skip to content

Commit a2ad239

Browse files
committed
Add test validating using CRD that misses explicit draft version
1 parent 51065ea commit a2ad239

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

acceptance.bats

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,8 @@ resetCacheFolder() {
340340
run xmllint --noout --schema fixtures/junit.xsd output.xml
341341
[ "$status" -eq 0 ]
342342
}
343+
344+
@test "passes when trying to use a CRD that does not have the JSONSchema set" {
345+
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"
346+
[ "$status" -eq 0 ]
347+
}

fixtures/httpproxy.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: projectcontour.io/v1
2+
kind: HTTPProxy
3+
metadata:
4+
name: basic
5+
spec:
6+
virtualhost:
7+
fqdn: foo-basic.example.com
8+
routes:
9+
- conditions:
10+
- prefix: /
11+
services:
12+
- name: s1
13+
port: 80

0 commit comments

Comments
 (0)