Skip to content

Commit

Permalink
Add test validating using CRD that misses explicit draft version
Browse files Browse the repository at this point in the history
  • Loading branch information
yannh committed Jul 16, 2023
1 parent 51065ea commit a2ad239
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions acceptance.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 13 additions & 0 deletions fixtures/httpproxy.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a2ad239

Please sign in to comment.