Capture coverage of integration tests

To capture the coverage also for the integration tests,
a test only executing the cmd.Run function is used.

The test always exits with code 0 and prints the
real exit code to stdout. Otherwise no coverage
report is generated.

Those changes enable a more accurate coverage report
for future contributions.
This commit is contained in:
Benj Fassbind
2022-07-11 16:04:06 +02:00
parent 69d473ea6f
commit 1d4e6183be
9 changed files with 140 additions and 23 deletions

View File

@@ -7,9 +7,12 @@ import (
"github.com/aptly-dev/aptly/aptly"
"github.com/aptly-dev/aptly/cmd"
_ "embed"
)
// Version variable, filled in at link time
//go:generate sh -c "make -s version | tr -d '\n' > VERSION"
//go:embed VERSION
var Version string
func main() {