Skip to content

Commit 90ae749

Browse files
authored
Update mockery to v3 (#327)
* Update mockery to v3 Signed-off-by: lapentafd <francesco.lapenta@est.tech> * fix lower came struct-causing private methods Signed-off-by: lapentafd <francesco.lapenta@est.tech> --------- Signed-off-by: lapentafd <francesco.lapenta@est.tech>
1 parent b3607ac commit 90ae749

15 files changed

Lines changed: 2195 additions & 1373 deletions

File tree

.mockery.yaml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,46 @@
1-
with-expecter: true
1+
template: testify
2+
template-data:
3+
unroll-variadic: true
4+
filename: "mock_{{ .InterfaceName }}.go"
5+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
6+
27
packages:
38
sigs.k8s.io/controller-runtime/pkg/client:
49
interfaces:
510
Client:
611
config:
7-
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
8-
outpkg: "{{.PackageName}}"
12+
dir: "test/mockery/mocks/external/sigs.k8s.io/controller-runtime/pkg/client"
913
Reader:
1014
config:
11-
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
12-
outpkg: "{{.PackageName}}"
15+
dir: "test/mockery/mocks/external/sigs.k8s.io/controller-runtime/pkg/client"
1316
SubResourceWriter:
1417
config:
15-
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
16-
outpkg: "{{.PackageName}}"
18+
dir: "test/mockery/mocks/external/sigs.k8s.io/controller-runtime/pkg/client"
1719
WithWatch:
1820
config:
19-
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
20-
outpkg: "{{.PackageName}}"
21+
dir: "test/mockery/mocks/external/sigs.k8s.io/controller-runtime/pkg/client"
22+
2123
github.com/nephio-project/porch/pkg/cache/crcache/meta:
2224
interfaces:
23-
MetadataStore:
24-
config:
25-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
26-
outpkg: "{{.PackageName}}"
25+
MetadataStore: {}
26+
2727
github.com/nephio-project/porch/pkg/cache/dbcache:
2828
interfaces:
2929
dbSQLInterface:
3030
config:
31-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
32-
outpkg: "{{.PackageName}}"
31+
structname: "MockdbSQLInterface"
32+
3333
github.com/nephio-project/porch/pkg/cache/types:
3434
interfaces:
35-
Cache:
36-
config:
37-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
38-
outpkg: "{{.PackageName}}"
39-
RepoPRChangeNotifier:
40-
config:
41-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
42-
outpkg: "{{.PackageName}}"
35+
Cache: {}
36+
RepoPRChangeNotifier: {}
37+
4338
github.com/nephio-project/porch/pkg/repository:
4439
interfaces:
45-
Repository:
46-
config:
47-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
48-
outpkg: "{{.PackageName}}"
49-
PackageRevision:
50-
config:
51-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
52-
outpkg: "{{.PackageName}}"
53-
PackageRevisionDraft:
54-
config:
55-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
56-
outpkg: "{{.PackageName}}"
40+
Repository: {}
41+
PackageRevision: {}
42+
PackageRevisionDraft: {}
43+
5744
github.com/nephio-project/porch/pkg/engine:
5845
interfaces:
59-
CaDEngine:
60-
config:
61-
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
62-
outpkg: "{{.PackageName}}"
46+
CaDEngine: {}

.mockery.yaml.bak

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
with-expecter: true
2+
packages:
3+
sigs.k8s.io/controller-runtime/pkg/client:
4+
interfaces:
5+
Client:
6+
config:
7+
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
8+
outpkg: "{{.PackageName}}"
9+
Reader:
10+
config:
11+
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
12+
outpkg: "{{.PackageName}}"
13+
SubResourceWriter:
14+
config:
15+
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
16+
outpkg: "{{.PackageName}}"
17+
WithWatch:
18+
config:
19+
dir: "test/mockery/mocks/external/{{.InterfaceDirRelative}}"
20+
outpkg: "{{.PackageName}}"
21+
github.com/nephio-project/porch/pkg/cache/crcache/meta:
22+
interfaces:
23+
MetadataStore:
24+
config:
25+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
26+
outpkg: "{{.PackageName}}"
27+
github.com/nephio-project/porch/pkg/cache/dbcache:
28+
interfaces:
29+
dbSQLInterface:
30+
config:
31+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
32+
outpkg: "{{.PackageName}}"
33+
github.com/nephio-project/porch/pkg/cache/types:
34+
interfaces:
35+
Cache:
36+
config:
37+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
38+
outpkg: "{{.PackageName}}"
39+
RepoPRChangeNotifier:
40+
config:
41+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
42+
outpkg: "{{.PackageName}}"
43+
github.com/nephio-project/porch/pkg/repository:
44+
interfaces:
45+
Repository:
46+
config:
47+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
48+
outpkg: "{{.PackageName}}"
49+
PackageRevision:
50+
config:
51+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
52+
outpkg: "{{.PackageName}}"
53+
PackageRevisionDraft:
54+
config:
55+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
56+
outpkg: "{{.PackageName}}"
57+
github.com/nephio-project/porch/pkg/engine:
58+
interfaces:
59+
CaDEngine:
60+
config:
61+
dir: "test/mockery/mocks/porch/{{.InterfaceDirRelative}}"
62+
outpkg: "{{.PackageName}}"

default-mockery.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515

16-
MOCKERY_VERSION=2.53.3
16+
MOCKERY_VERSION=3.5.5
1717
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
1818
OS_ARCH ?= $(shell uname -m)
1919
OS ?= $(shell uname)

0 commit comments

Comments
 (0)