cloud66-oss / copper

A configuration file validator for Kubernetes.
https://help.cloud66.com/copper/
Apache License 2.0
274 stars 15 forks source link

Return code only reflects validation of the last segment #9

Closed jeffstephens closed 6 years ago

jeffstephens commented 6 years ago

When running on a multi-template file, it seems the return code only reflects the last segment. For example, this output corresponds to a return code 1:

Validating part 0
    ApiV1Only - FAIL
Validating part 1
    ApiV1Only - PASS
Validating part 2
    ApiV1Only - FAIL

...while this output corresponds to a return code 0:

Validating part 0
    ApiV1Only - FAIL
Validating part 1
    ApiV1Only - PASS
Validating part 2
    ApiV1Only - PASS

I would expect a return code 0 only when all validations pass, and a 1 otherwise.

I will look at making this change and opening a PR - just wanted to document it here first!

jeffstephens commented 6 years ago

I've opened PR #10 to fix this issue - let me know if you need anything else from me!