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

Collect E2E coverage profiles #1763

Open
charithe opened this issue Aug 22, 2023 · 0 comments
Open

Collect E2E coverage profiles #1763

charithe opened this issue Aug 22, 2023 · 0 comments

Comments

@charithe
Copy link
Contributor

charithe commented Aug 22, 2023

In order to collect coverage profiles from E2E tests, we need to do the following:

  • Build a special container containing a Cerbos binary built with go build -cover
  • In the E2E setup:
    • Mount host volume to Kind cluster to collect coverage files
    • Launch Cerbos container with GOCOVERDIR set to above volume path
  • Run the E2E suite
  • Convert the coverage data stored in the host volume using go tool covdata textfmt -i=HOST_VOLUME_DIR -o=e2e.cover
  • Upload e2e.cover to Coveralls

https://go.dev/testing/coverage/
https://go.dev/blog/integration-test-coverage

charithe added a commit to charithe/cerbos that referenced this issue Aug 22, 2023
Also removes the E2E upload because we need to build a special binary to
capture E2E coverage (cerbos#1763).

Signed-off-by: Charith Ellawala <charith@cerbos.dev>
charithe added a commit that referenced this issue Aug 22, 2023
Also removes the E2E upload because we need to build a special binary to
capture E2E coverage (#1763).

Signed-off-by: Charith Ellawala <charith@cerbos.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant