projectcontour / integration-tester

Integration Tester for Kubernetes
Other
3 stars 5 forks source link

Add a test summarizer. #3

Closed jpeach closed 4 years ago

jpeach commented 4 years ago

When running multiple test documents, it is difficult to pick the failures out of a wall of text. Add a primitive test summarizer that shows a result summary at the end of the test run.

Signed-off-by: James Peach jpeach@vmware.com

jpeach commented 4 years ago

The test summary ends up looking like this:

$ ./run-test-case.sh httpproxy/*.yaml
...
ok 45 - running object update check
ok 46 - running Rego check lines 222-236
# hydrated cert-manager.io/v1alpha2:Certificate object '007-client-cert-auth/echo-client-cert-selfsigned'
ok 47 - hydrating Kubernetes object lines 238-255
ok 48 - matching anonymous Kubernetes object
# performing update operation on Certificate '007-client-cert-auth/echo-client-cert-selfsigned'
ok 49 - updating Kubernetes object
# checking update of Certificate '007-client-cert-auth/echo-client-cert-selfsigned'
ok 50 - running object update check
ok 51 - running Rego check lines 257-271
# hydrated projectcontour.io/v1:HTTPProxy object '007-client-cert-auth/echo-no-auth'
ok 52 - hydrating Kubernetes object lines 273-290
ok 53 - matching anonymous Kubernetes object
# performing update operation on HTTPProxy '007-client-cert-auth/echo-no-auth'
ok 54 - updating Kubernetes object
# checking update of HTTPProxy '007-client-cert-auth/echo-no-auth'
ok 55 - running object update check
# hydrated projectcontour.io/v1:HTTPProxy object '007-client-cert-auth/echo-with-auth'
ok 56 - hydrating Kubernetes object lines 292-311
ok 57 - matching anonymous Kubernetes object
# performing update operation on HTTPProxy '007-client-cert-auth/echo-with-auth'
ok 58 - updating Kubernetes object
# checking update of HTTPProxy '007-client-cert-auth/echo-with-auth'
ok 59 - running object update check
ok 60 - running Rego check lines 313-332
ok 61 - running Rego check lines 334-353
ok 62 - running Rego check lines 355-399
ok 63 - running Rego check lines 401-449
1..63

httpproxy/001-required-field-validation.yaml    PASSED
httpproxy/002-header-condition-match.yaml       PASSED
httpproxy/003-path-condition-match.yaml         PASSED
httpproxy/004-https-sni-enforcement.yaml        PASSED
httpproxy/005-pod-restart.yaml                  PASSED
httpproxy/006-merge-slash.yaml                  PASSED
httpproxy/007-client-cert-auth.yaml             PASSED