Skip to content

Commit

Permalink
Get unit tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed Dec 19, 2023
1 parent 76bb838 commit 2351592
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ unit: test
.PHONY: test
test: ## Run unit tests (go test)
ifeq ($(CONTAINER_RUNNABLE), 0)
$(RUN_CONTAINER_COMMAND) docker.io/library/golang:${GO_VERSION}-alpine3.17 \
sh -e -c "go test ./... -v -coverprofile ${TEST_COVERAGE_FILE}; \
$(RUN_CONTAINER_COMMAND) docker.io/nephio/gotests:1671656214984921088 \
sh -e -c "git config --global --add user.name test; \
git config --global --add user.email test@nephio.org; \
go test ./... -v -coverprofile ${TEST_COVERAGE_FILE}; \
go tool cover -html=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_HTML_FILE}; \
go tool cover -func=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_FUNC_FILE}"
else
Expand Down

0 comments on commit 2351592

Please sign in to comment.