Skip to content

test(bats): generate coverage info during end-to-end tests #61

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dverite
Copy link
Collaborator

@dverite dverite commented Jun 3, 2025

Use "go -cover" to build the executable for coverage tests
Add a new "coverage" target in the Makefile running "go test" and the e2e tests and merging the results
Add a new job in github workflow to generate and merge the coverage outputs

For the bats-test target, build and use a specific binary
with the -cover option
For the test target, generate coverage information in the
same directory as e2e with test.gocoverdir

Signed-off-by: Daniel Vérité <[email protected]>
@dverite dverite force-pushed the e2e-coverage branch 3 times, most recently from 582c191 to a4daf7e Compare June 3, 2025 15:09
Signed-off-by: Daniel Vérité <[email protected]>
Copy link

github-actions bot commented Jun 3, 2025

Code Coverage

Package Line Rate Health
github.com/qonto/postgresql-partition-manager/cmd 50%
github.com/qonto/postgresql-partition-manager/cmd/run 70%
github.com/qonto/postgresql-partition-manager/cmd/validate 65%
github.com/qonto/postgresql-partition-manager/internal/infra/config 71%
github.com/qonto/postgresql-partition-manager/internal/infra/logger 100%
github.com/qonto/postgresql-partition-manager/internal/infra/partition 78%
github.com/qonto/postgresql-partition-manager/internal/infra/postgresql 94%
github.com/qonto/postgresql-partition-manager/internal/infra/retry 100%
github.com/qonto/postgresql-partition-manager/internal/infra/uuid7 91%
github.com/qonto/postgresql-partition-manager 100%
github.com/qonto/postgresql-partition-manager/pkg/ppm 70%
Summary 75% (914 / 1222)

@dverite
Copy link
Collaborator Author

dverite commented Jun 10, 2025

#sre-storage

Copy link

@jbourdale jbourdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants