Skip to content

Commit 41435b8

Browse files
author
David Chung
committed
Add test target in Makefile; fix broken tests and mocks
Signed-off-by: David Chung <[email protected]>
1 parent 7c70f9d commit 41435b8

File tree

5 files changed

+336
-40
lines changed

5 files changed

+336
-40
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,20 @@ azure-release:
4848

4949
azure-template:
5050
$(MAKE) -C azure/release template
51+
52+
# Package list
53+
PKGS_AND_MOCKS := $(shell go list ./... | grep -v /vendor)
54+
PKGS := $(shell echo $(PKGS_AND_MOCKS) | tr ' ' '\n' | grep -v /mock$)
55+
56+
get-gomock:
57+
@echo "+ $@"
58+
-go get github.com/golang/mock/gomock
59+
-go get github.com/golang/mock/mockgen
60+
61+
generate:
62+
@echo "+ $@"
63+
@go generate -x $(PKGS_AND_MOCKS)
64+
65+
test:
66+
@echo "+ $@"
67+
@go test -v github.com/docker/editions/pkg/loadbalancer

0 commit comments

Comments
 (0)