Mockery started to throw errors like "Unexpected package creation during export data loading".

This was consistently reproducible locally and on upgrade, it has gone away.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-04-10 14:20:57 +05:30
коммит произвёл GitHub
родитель 6be0ed0d19
Коммит bcf115e315
77 изменённых файлов: 4317 добавлений и 876 удалений

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
@@ -24,13 +24,16 @@ func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) {
ret := _m.Called(fr, path)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
return rf(fr, path)
}
if rf, ok := ret.Get(0).(func(io.Reader, string) int64); ok {
r0 = rf(fr, path)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(io.Reader, string) error); ok {
r1 = rf(fr, path)
} else {
@@ -59,13 +62,16 @@ func (_m *FileBackend) FileExists(path string) (bool, error) {
ret := _m.Called(path)
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(path)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -80,13 +86,16 @@ func (_m *FileBackend) FileModTime(path string) (time.Time, error) {
ret := _m.Called(path)
var r0 time.Time
var r1 error
if rf, ok := ret.Get(0).(func(string) (time.Time, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) time.Time); ok {
r0 = rf(path)
} else {
r0 = ret.Get(0).(time.Time)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -101,13 +110,16 @@ func (_m *FileBackend) FileSize(path string) (int64, error) {
ret := _m.Called(path)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) int64); ok {
r0 = rf(path)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -122,6 +134,10 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
ret := _m.Called(path)
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(path)
} else {
@@ -130,7 +146,6 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -145,6 +160,10 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
ret := _m.Called(path)
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(path)
} else {
@@ -153,7 +172,6 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -182,6 +200,10 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
ret := _m.Called(path)
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) []byte); ok {
r0 = rf(path)
} else {
@@ -190,7 +212,6 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -205,6 +226,10 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
ret := _m.Called(path)
var r0 filestore.ReadCloseSeeker
var r1 error
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, error)); ok {
return rf(path)
}
if rf, ok := ret.Get(0).(func(string) filestore.ReadCloseSeeker); ok {
r0 = rf(path)
} else {
@@ -213,7 +238,6 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(path)
} else {
@@ -270,13 +294,16 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
ret := _m.Called(fr, path)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
return rf(fr, path)
}
if rf, ok := ret.Get(0).(func(io.Reader, string) int64); ok {
r0 = rf(fr, path)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(io.Reader, string) error); ok {
r1 = rf(fr, path)
} else {
@@ -285,3 +312,18 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
return r0, r1
}
type mockConstructorTestingTNewFileBackend interface {
mock.TestingT
Cleanup(func())
}
// NewFileBackend creates a new instance of FileBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFileBackend(t mockConstructorTestingTNewFileBackend) *FileBackend {
mock := &FileBackend{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
@@ -30,13 +30,16 @@ func (_m *ReadCloseSeeker) Read(p []byte) (int, error) {
ret := _m.Called(p)
var r0 int
var r1 error
if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
return rf(p)
}
if rf, ok := ret.Get(0).(func([]byte) int); ok {
r0 = rf(p)
} else {
r0 = ret.Get(0).(int)
}
var r1 error
if rf, ok := ret.Get(1).(func([]byte) error); ok {
r1 = rf(p)
} else {
@@ -51,13 +54,16 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
ret := _m.Called(offset, whence)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(int64, int) (int64, error)); ok {
return rf(offset, whence)
}
if rf, ok := ret.Get(0).(func(int64, int) int64); ok {
r0 = rf(offset, whence)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(int64, int) error); ok {
r1 = rf(offset, whence)
} else {
@@ -66,3 +72,18 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
return r0, r1
}
type mockConstructorTestingTNewReadCloseSeeker interface {
mock.TestingT
Cleanup(func())
}
// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewReadCloseSeeker(t mockConstructorTestingTNewReadCloseSeeker) *ReadCloseSeeker {
mock := &ReadCloseSeeker{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}