Commit graph

58 commits

Author SHA1 Message Date
Yann Hamon
e65429b1e5
Add support for duration (#328)
* Add custom validation logic for durations
2025-05-12 11:15:53 +02:00
Yann Hamon
3134f4477e
Add acceptance tests for caching of references (#326) 2025-05-12 08:14:28 +02:00
Yann Hamon
31e9679c96
Update jsonschema library to v6 (#324) 2025-05-11 02:05:01 +02:00
Yann Hamon
a4d74ce7d2
Fail early on incorrect version of k8s (#254)
* Fail early on incorrect version of k8s

* fix tests
2023-12-24 18:05:04 +01:00
Yann Hamon
6ae8c45bc1
openapi2jsonschema.py now correctly fails if no FILE is passed (#244)
* openapi2jsonschema.py now correctly fails if no FILE is passed
* Update acceptance tests
2023-11-18 18:08:18 +01:00
Yann Hamon
ae67bb4709
Force Draft version of JsonSchema (#221)
* Force Draft version of JsonSchema
* Add test validating using CRD that misses explicit draft version
2023-07-16 09:42:11 +02:00
Yann Hamon
ee7c498580
Migrate to santhosh-tekuri/jsonschema (#168)
* Migrate to santhosh-tekuri/jsonschema
2023-01-23 19:22:20 +01:00
Andrea Tosatto
d8e348a597
Allow to skip resources using the GVK notation (#92)
* Allow to skip resources using the GVK notation
* Update flags description, add integration tests and update readme

Co-authored-by: Yann Hamon <yann@mandragor.org>
2022-10-16 14:59:48 +02:00
Yann Hamon
f5338b07f9
Validate JUnit output against Jenkins JUnit XSD (#134)
* Validate JUnit output against Jenkins JUnix XSD

* Add missing Jenkins JUnit XSD

* Add time to TestCase for #127
2022-10-16 13:52:04 +02:00
Bill Franklin
9a6fff13cb
Forbid duplicate keys in strict mode (#121)
* Forbid duplicate keys in strict mode

Prevents specifying duplicate keys using
UnmarshallStrict: https://pkg.go.dev/gopkg.in/yaml.v2#UnmarshalStrict

* Add acceptance tests for duplicated properties
2022-07-15 14:23:10 +02:00
Calle Pettersson
7bf1e01dec
fix: change flag parse error handling to return errors instead of exiting (#107)
* fix: change flag parse error handling to return errors instead of exiting

Having ExitOnError in combination with SetOutput to a buffer instead of
stdout/stderr means flags.Parse output is swallowed and kubeconform silently
exits directly with exit code 2 instead of returning the error.

Setting ContinueOnError instead returns the error, and writes usage help to
the buffer, so error handling code in main is reached.

* Add test for parsing incorrect flags

Co-authored-by: Yann Hamon <yann@mandragor.org>
2022-06-19 18:38:52 +02:00
Yann Hamon
6c1fa513e9 Fixes acceptance test with new TAP output 2021-12-19 01:15:31 +01:00
Yann Hamon
ab4745ddf0 Small clean-up 2021-09-26 22:55:01 +02:00
Yann Hamon
b571b18f8d Rename acceptance tests for consistency 2021-09-26 18:00:36 +02:00
Yann Hamon
b5c823d6b5 Also read up to 256MB from stdin 2021-09-26 17:45:27 +02:00
Yann Hamon
4a8aace275 Add acceptance test 2021-09-26 17:40:58 +02:00
Yann Hamon
73f65d7530 Add acceptance test for HTTPS_PROXY support 2021-09-26 12:11:42 +02:00
Yann Hamon
4eb75860d9 support for lists 2021-07-03 15:49:37 +02:00
Yann Hamon
a5a34675c0 Fix usage of -h 2021-03-08 18:14:24 +01:00
Yann Hamon
6308d55977 only read from stdin when no other files/folders given 2021-03-07 23:59:13 +01:00
Yann Hamon
b10927a052 Update Readme, add 'default' value for -schema-location parameter 2021-02-27 16:37:24 +01:00
Yann Hamon
f564719d74 Run some acceptance tests with network disabled 2021-01-09 01:07:43 +01:00
Yann Hamon
1cfbacd92c Add acceptance tests for TAP output 2021-01-02 14:20:54 +01:00
Yann Hamon
128fcf993b fail early when cache folder does not exist 2021-01-02 11:57:52 +01:00
Yann Hamon
1a76217195 fix - do try following schema registries when schema not found in local registry 2020-12-29 19:16:28 +01:00
Yann Hamon
509ad8e997 add test for missing apiVersion - better error message 2020-12-23 18:25:46 +01:00
Yann Hamon
b524ace87f fix usage of context 2020-11-16 01:01:13 +01:00
Yann Hamon
f63d329742 throw error when file with key/values is missing a Kind, add acc test 2020-11-15 23:44:15 +01:00
Yann Hamon
d0ac45222c sort tests 2020-11-15 20:27:44 +01:00
Yann Hamon
651d3b2c50 fail early when a broken -schema-location template is given 2020-11-15 20:23:37 +01:00
Yann Hamon
b33767a477 fix acc tests 2020-11-15 16:24:27 +01:00
Yann Hamon
3a2d4705f5 better yaml splitting - not perfect but similar to k8s - fix path logging 2020-11-08 23:48:02 +01:00
Yann Hamon
f78b65b025 add -ignore-filename-pattern option 2020-11-08 19:57:01 +01:00
Yann Hamon
b162c5b6f5 Add support for -reject and update README 2020-11-08 10:36:53 +01:00
Yann Hamon
0a7f885768 Refactor resource discovery 2020-11-01 20:09:48 +01:00
Yann Hamon
456f255478 Add more acceptance tests 2020-10-31 14:13:50 +01:00
Yann Hamon
7402d0fed8 Add support for passing manifests via stdin 2020-10-31 14:02:15 +01:00
Yann Hamon
42949e20b2 Add acceptance tests to validate openshift behaviour 2020-10-31 13:26:29 +01:00
Yann Hamon
a83c915a24 rename -k8sversion to -kubernetes-version to stay close to kubeval 2020-10-18 14:46:54 +02:00
Yann Hamon
0949b76f51 rename -regitry to -schema-location, make its syntax more compatible to kubeval 2020-10-18 14:28:19 +02:00
Yann Hamon
472100550c acceptnace tests for custom registry 2020-10-18 14:07:47 +02:00
Yann Hamon
9dda2ff599 more acceptance tests 2020-10-18 14:04:23 +02:00
Yann Hamon
51732e6a21 count empty files in the number of parsed files in text output 2020-10-18 13:52:40 +02:00
Yann Hamon
54d899f8f6 add more acceptance tests 2020-10-18 13:13:37 +02:00
Yann Hamon
5920cccf07 fine-tune text logging 2020-10-18 12:57:17 +02:00
Yann Hamon
52437c00d1 Add resource name to logging 2020-10-18 12:50:52 +02:00
Yann Hamon
5ada0b67e5 Add test for validating a Custom Resource with a local CRD 2020-10-17 17:12:59 +02:00
Yann Hamon
59c23325d3 replace -schema with -local-registry 2020-06-07 18:59:03 +02:00
Yann Hamon
9293920f2a add test to validate a folder 2020-06-06 18:46:08 +02:00
Yann Hamon
c82866923c update acceptance tests / error mgmt 2020-06-06 18:31:22 +02:00