File tree 7 files changed +27
-56
lines changed
7 files changed +27
-56
lines changed Original file line number Diff line number Diff line change 1
- packages :
2
- github.com/nephio-project/nephio/controllers/pkg/giteaclient :
3
- interfaces :
4
- GiteaClient :
5
- config :
6
- dir : " {{.InterfaceDir}}"
1
+ with-expecter : true
Original file line number Diff line number Diff line change @@ -51,21 +51,4 @@ unit-clean: ## These targets are delegated to the Makefiles of individual Go mod
51
51
docker-build docker-push : # # These targets are delegated to the Makefiles next to Dockerfiles
52
52
for dir in $( DOCKERFILE_DIRS) ; do \
53
53
$(MAKE ) -C " $$ dir" $@ ; \
54
- done
55
-
56
-
57
- # #@ Mockery code
58
-
59
- .PHONY : install-mockery
60
- install-mockery : # # install mockery
61
- ifeq ($(CONTAINER_RUNNABLE ) , 0)
62
- $(CONTAINER_RUNTIME) pull docker.io/vektra/mockery:v${MOCKERY_VERSION}
63
- else
64
- wget -qO- https://github.com/vektra/mockery/releases/download/v${MOCKERY_VERSION}/mockery_${MOCKERY_VERSION}_${OS}_${OS_ARCH}.tar.gz | sudo tar -xvzf - -C /usr/local/bin
65
- endif
66
-
67
- .PHONY : generate-mocks
68
- generate-mocks :
69
- for dir in $( GO_MOD_DIRS) ; do \
70
- $(MAKE ) -C " $$ dir" $@ || true ; \
71
- done
54
+ done
Original file line number Diff line number Diff line change @@ -23,16 +23,3 @@ include ../../default-go.mk
23
23
24
24
# This includes the 'help' target that prints out all targets with their descriptions organized by categories
25
25
include ../../default-help.mk
26
-
27
- # This includes the below targets for mockery
28
- # install-mockery
29
- # generate-mocks
30
- include ../../default-mockery.mk
31
- .PHONY : generate-mocks
32
- generate-mocks :
33
- ifeq ($(CONTAINER_RUNNABLE ) , 0)
34
- echo ${PWD}
35
- $(CONTAINER_RUNTIME) run --security-opt label=disable -v ${PWD}:/src -w /src/controllers/pkg docker.io/vektra/mockery:v${MOCKERY_VERSION}
36
- else
37
- mockery
38
- endif
Original file line number Diff line number Diff line change 14
14
15
15
16
16
GO_VERSION ?= 1.20.2
17
- MOCKERY_VERSION =2.37.1
18
17
TEST_COVERAGE_FILE =lcov.info
19
18
TEST_COVERAGE_HTML_FILE =coverage_unit.html
20
19
TEST_COVERAGE_FUNC_FILE =func_coverage.out
39
38
go tool cover -func=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_FUNC_FILE}
40
39
endif
41
40
42
- .PHONY : install-mockery
43
- install-mockery : # # install mockery
44
- ifeq ($(CONTAINER_RUNNABLE ) , 0)
45
- $(CONTAINER_RUNTIME) pull docker.io/vektra/mockery:v${MOCKERY_VERSION}
46
- else
47
- wget -qO- https://github.com/vektra/mockery/releases/download/v${MOCKERY_VERSION}/mockery_${MOCKERY_VERSION}_${OS}_${OS_ARCH}.tar.gz | sudo tar -xvzf - -C /usr/local/bin
48
- endif
49
-
50
- .PHONY : generate-mocks
51
- generate-mocks :
52
- ifeq ($(CONTAINER_RUNNABLE ) , 0)
53
- $(CONTAINER_RUNTIME) run --security-opt label=disable -v ${PWD}:/src -w /src docker.io/vektra/mockery:v${MOCKERY_VERSION}
54
- else
55
- mockery
56
- endif
57
-
58
41
.PHONY : unit-clean
59
42
unit-clean : # # Clean up the artifacts created by the unit tests
60
43
ifeq ($(CONTAINER_RUNNABLE ) , 0)
Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ include $(GIT_ROOT_DIR)/default-go-misc.mk
20
20
include $(GIT_ROOT_DIR ) /default-go-test.mk
21
21
include $(GIT_ROOT_DIR ) /default-go-lint.mk
22
22
include $(GIT_ROOT_DIR ) /default-gosec.mk
23
+ include $(GIT_ROOT_DIR ) /default-mockery.mk
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
16
- MOCKERY_VERSION =2.37.1
16
+ MOCKERY_VERSION =2.41.0
17
17
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST ) ) )
18
18
OS_ARCH ?= $(shell uname -m)
19
19
OS ?= $(shell uname)
20
20
include $(GIT_ROOT_DIR ) /detect-container-runtime.mk
21
+
22
+ .PHONY : install-mockery
23
+ install-mockery : # # install mockery
24
+ ifeq ($(CONTAINER_RUNNABLE ) , 0)
25
+ $(CONTAINER_RUNTIME) pull docker.io/vektra/mockery:v${MOCKERY_VERSION}
26
+ else
27
+ wget -qO- https://github.com/vektra/mockery/releases/download/v${MOCKERY_VERSION}/mockery_${MOCKERY_VERSION}_${OS}_${OS_ARCH}.tar.gz | sudo tar -xvzf - -C /usr/local/bin
28
+ endif
29
+
30
+ .PHONY : generate-mocks
31
+ generate-mocks :
32
+ ifeq ($(CONTAINER_RUNNABLE ) , 0)
33
+ find . -name .mockery.yaml \
34
+ -exec echo generating mocks specified in {} . . . \; \
35
+ -execdir $(CONTAINER_RUNTIME) run --security-opt label=disable -v .:/src -w /src docker.io/vektra/mockery:v${MOCKERY_VERSION} \; \
36
+ -exec echo generated mocks specified in {} \;
37
+ else
38
+ find . -name .mockery.yaml \
39
+ -exec echo generating mocks specified in {} . . . \; \
40
+ -execdir mockery \; \
41
+ -exec echo generated mocks specified in {} \;
42
+ endif
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ all: fmt lint gosec
8
8
include ../../default-go.mk
9
9
10
10
# This includes the 'help' target that prints out all targets with their descriptions organized by categories
11
- include ../../default-help.mk
11
+ include ../../default-help.mk
You can’t perform that action at this time.
0 commit comments