yannh / kubeconform

A FAST Kubernetes manifests validator, with support for Custom Resources!
Apache License 2.0
2.07k stars 116 forks source link

Bug: Junit output shows top-level error count, but not error-count within a test suite #246

Closed jcmcken closed 7 months ago

jcmcken commented 8 months ago

E.g. it shows output like:

<testsuites name="kubeconform" ... errors="1">
  <testsuite ... errors="0">
    <testcase name="foo" ...>
      <error message="could not find schema for Ingress"></error>
    </testcase>
  </testsuite>
</testsuites>

The individual test case sees the error message, but it's not counted in the test suite summary (errors="0"), and it is counted at the very top level (errors="1").

Running kubeconform like this:

kubeconform -schema-location /path/to/local/dir -strict -summary -output junit -verbose /path/to/dir
yannh commented 7 months ago

Hi @jcmcken , you are correct. I have opened a branch that should fix the behaviour. Expect a merge and a release in the next few weeks. Thanks a lot for reporting the issue!