generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copyonwrite/367/fix make error mockery (#368)
* Make 'make' install mockery * Add 'all' target to Makefile and fix 'mockery' error * Install mockery in goal 'install-build-dependencies'
- Loading branch information
1 parent
5ee2276
commit db9995f
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ ifeq ($(wildcard .env),.env) | |
export $(shell sed 's/=.*//' .env) | ||
endif | ||
|
||
all: build-binary test-all | ||
|
||
build-binary: mockery gqlgen | ||
GO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o build/heureka cmd/heureka/main.go | ||
|
||
|
@@ -62,9 +64,13 @@ run: | |
gqlgen: | ||
cd internal/api/graphql && go run github.com/99designs/gqlgen generate | ||
|
||
mockery: | ||
mockery: install-build-dependencies | ||
mockery | ||
|
||
install-build-dependencies: | ||
go install github.com/vektra/mockery/[email protected] | ||
|
||
|
||
GINKGO := go run github.com/onsi/ginkgo/v2/ginkgo | ||
test-all: mockery gqlgen | ||
$(GINKGO) -r | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,9 @@ Use the following command in the root folder of heureka: | |
|
||
Heureka uses [Mockery](https://vektra.github.io/mockery/) for building Mocks based on defined interfaces for the purpose of Unit-Testing. | ||
|
||
Please [follow the steps to install mockery on your local system](https://vektra.github.io/mockery/latest/installation/) to be able to build mocks. | ||
The Makefile/Dockerfile take care of installing mockery via | ||
|
||
go install github.com/vektra/mockery/[email protected] | ||
|
||
#### Using Ginkgo | ||
|
||
|