From 18f3c9ed1b74b3d48f8d872042aa749f018e3cb2 Mon Sep 17 00:00:00 2001 From: yxxhero Date: Fri, 9 Jun 2023 20:52:47 +0800 Subject: [PATCH 1/2] add unittest cover Signed-off-by: yxxhero --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c082cea..7e6c5819 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,8 @@ build: lint .PHONY: test test: - go test -v ./... + go test -v ./... -coverprofile cover.out -race -p=1 + go tool cover -func cover.out .PHONY: bootstrap bootstrap: From b8b613c9bc4ad5627d4145d0aa157d168542a9fd Mon Sep 17 00:00:00 2001 From: yxxhero Date: Sat, 10 Jun 2023 19:22:27 +0800 Subject: [PATCH 2/2] remove -p=1 for cover Signed-off-by: yxxhero --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7e6c5819..bf4cf3cf 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ build: lint .PHONY: test test: - go test -v ./... -coverprofile cover.out -race -p=1 + go test -v ./... -coverprofile cover.out -race go tool cover -func cover.out .PHONY: bootstrap