Add some additional test run output
This commit is contained in:
parent
47f1c14c48
commit
fed9224c17
2
Makefile
2
Makefile
@ -29,7 +29,7 @@ build: $(APP_NAME)
|
||||
# Run all tests
|
||||
.PHONY: test
|
||||
test:
|
||||
go test -coverprofile=coverage.out # -short
|
||||
go test -v -coverprofile=coverage.out # -short
|
||||
go tool cover -func=coverage.out
|
||||
|
||||
# Installs pre-commit hooks
|
||||
|
@ -16,6 +16,8 @@ func TestMain(m *testing.M) {
|
||||
testResult := m.Run()
|
||||
|
||||
if testResult == 0 && testing.CoverMode() != "" {
|
||||
fmt.Printf("Covermode: %s", testing.CoverMode())
|
||||
|
||||
c := testing.Coverage()
|
||||
if c < MinCoverage {
|
||||
fmt.Printf("Tests passed but coverage failed at %0.2f and minimum to pass is %0.2f\n", c, MinCoverage)
|
||||
|
Loading…
Reference in New Issue
Block a user