logging-operator
logging-operator copied to clipboard
add coverage reporting for e2e tests
fixes #1533
This works in my local but didn't work in Github CI. Most likely, kind host volume mounts don't work in here. I will try to solve this with something else.
Below you can see output from the fist successful run:
--- E2E test coverage report
go tool covdata percent -i=/home/runner/work/logging-operator/logging-operator/build/_test_coverage/covdatafiles
github.com/kube-logging/logging-operator coverage: 57.7% of statements
github.com/kube-logging/logging-operator/controllers/extensions coverage: 5.9% of statements
github.com/kube-logging/logging-operator/controllers/logging coverage: 75.5% of statements
github.com/kube-logging/logging-operator/pkg/compression coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/mirror coverage: 65.0% of statements
github.com/kube-logging/logging-operator/pkg/resources coverage: 100.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/annotation coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/configcheck coverage: 76.7% of statements
github.com/kube-logging/logging-operator/pkg/resources/eventtailer coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/fluentbit coverage: 60.5% of statements
github.com/kube-logging/logging-operator/pkg/resources/fluentd coverage: 62.7% of statements
github.com/kube-logging/logging-operator/pkg/resources/hosttailer coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/kubetool coverage: 25.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/loggingdataprovider github.com/kube-logging/logging-operator/pkg/resources/model coverage: 68.3% of statements
github.com/kube-logging/logging-operator/pkg/resources/nodeagent coverage: 0.4% of statements
github.com/kube-logging/logging-operator/pkg/resources/prometheus-operator coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/syslogng coverage: 57.1% of statements
github.com/kube-logging/logging-operator/pkg/resources/templates coverage: 75.0% of statements
github.com/kube-logging/logging-operator/pkg/resources/volumepath coverage: 0.0% of statements
github.com/kube-logging/logging-operator/pkg/webhook/podhandler coverage: 0.0% of statements
@nak0f this looks good, do you think this is now ready for review?
@nak0f this looks good, do you think this is now ready for review?
I was thinking of merging these with unit test coverage. Maybe adding a CI step with a coverage check. Is it better to keep this separate and leave these for future?
whatever works for you, no hurries
After taking a look, I think it is better to keep E2E test coverage separated as CI and E2E tests run in different Workflows.
Please leave your review when available.