From a5e09ab28a3728252672bcaac3ffd4cdffac36f7 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 14 Jan 2025 15:19:00 +0100 Subject: [PATCH] Coverage for acceptance tests (#2123) ## Changes Add two new make commands: - make acc-cover: runs acceptance tests and outputs coverage-acceptance.txt - make acc-showcover: show coverage-acceptance.txt locally in browser Using the GOCOVERDIR functionality: https://go.dev/blog/integration-test-coverage This works, but there are a couple of issues encountered: - GOCOVERDIR does not play well with regular "go test -cover". Once this fixed, we can simplify the code and have 'make cover' output coverage for everything at once. We can also probably get rid of CLI_GOCOVERDIR. https://github.com/golang/go/issues/66225 - When running tests in parallel to the same directory there is rare conflict on writing covmeta file. For this reason each tests writes coverage to their own directory which is then merged together by 'make acc-cover'.