diff --git a/.gitignore b/.gitignore index f23f81a9b..2adca1958 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ grpc-porter-tls.key grpc-porter.csr .grpcurl/ config.yaml + +# Output of the go coverage tool +coverage-unit.out +coverage-integration.out \ No newline at end of file diff --git a/magefile.go b/magefile.go index 170272a45..5d5f1532a 100644 --- a/magefile.go +++ b/magefile.go @@ -274,7 +274,7 @@ func TestUnit() { v = "-v" } - must.Command("go", "test", v, "./...").CollapseArgs().RunV() + must.Command("go", "test", v, "./...", "-coverprofile", "coverage-unit.out").CollapseArgs().RunV() // Verify integration tests compile since we don't run them automatically on pull requests must.Run("go", "test", "-run=non", "-tags=integration", "./...") @@ -588,7 +588,7 @@ func TestIntegration() { path = "./tests/integration/" + filename } - must.Command("go", "test", verbose, "-timeout=30m", run, "-tags=integration", path).CollapseArgs().RunV() + must.Command("go", "test", verbose, "-timeout=30m", run, "-tags=integration", path, "-coverprofile", "coverage-integration.out").CollapseArgs().RunV() } func TestInitWarnings() {