Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add coverage reporting for e2e tests #1726

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nak0f
Copy link
Contributor

@nak0f nak0f commented Apr 20, 2024

fixes #1533

Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
@nak0f
Copy link
Contributor Author

nak0f commented Apr 23, 2024

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.

…volume mounts.

Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
Signed-off-by: nakof <12702673+nak0f@users.noreply.github.com>
@nak0f
Copy link
Contributor Author

nak0f commented Apr 25, 2024

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

@pepov
Copy link
Member

pepov commented Apr 29, 2024

@nak0f this looks good, do you think this is now ready for review?

@pepov pepov added the testing label Apr 29, 2024
@pepov pepov self-requested a review April 29, 2024 16:43
@nak0f
Copy link
Contributor Author

nak0f commented May 1, 2024

@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?

@pepov
Copy link
Member

pepov commented May 3, 2024

whatever works for you, no hurries

Signed-off-by: Nihat Ciddi <12702673+nak0f@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: add e2e test coverage report
2 participants