Skip to content

Commit dc9b13d

Browse files
committed
add individual module coverage
1 parent 44f150b commit dc9b13d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ test-all: test-azure-ipam test-azure-ip-masq-merger test-main ## run all unit te
827827

828828
test-main:
829829
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-main.out $(COVER_PKG)/...
830+
go tool cover -func=coverage-main.out
830831

831832
test-integration: ## run all integration tests.
832833
AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) \
@@ -857,10 +858,10 @@ test-extended-cyclonus: ## run the cyclonus test for npm.
857858
cd ..
858859

859860
test-azure-ipam: ## run the unit test for azure-ipam
860-
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out
861+
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -func=../coverage-azure-ipam.out
861862

862863
test-azure-ip-masq-merger: ## run the unit test for azure-ip-masq-merger
863-
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out
864+
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -func=../coverage-azure-ip-masq-merger.out
864865

865866
kind:
866867
kind create cluster --config ./test/kind/kind.yaml

0 commit comments

Comments
 (0)