aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-07-01 19:09:33 +0200
committerTaras Madan <tarasmadan@google.com>2025-07-01 21:41:27 +0000
commitbc80e4f080d226b12fae367dc46bc54ac3681009 (patch)
tree396991c29ca9a28b701a72013e5283ef0188b8ec
parent065d1b73397a6839320b1fc6cb5b40e8623a4825 (diff)
all/mocks: regenerate with mockery v3
-rw-r--r--pkg/coveragedb/mocks/ReadOnlyTransaction.go69
-rw-r--r--pkg/coveragedb/mocks/Row.go61
-rw-r--r--pkg/coveragedb/mocks/RowIterator.go65
-rw-r--r--pkg/coveragedb/mocks/SpannerClient.go119
-rw-r--r--pkg/covermerger/mocks/FileVersProvider.go90
-rw-r--r--pkg/gcs/mocks/Client.go248
-rw-r--r--pkg/rpcserver/mocks/Manager.go150
-rw-r--r--vm/proxyapp/mocks/ProxyAppInterface.go334
-rw-r--r--vm/proxyapp/mocks/subProcessCmd.go136
9 files changed, 724 insertions, 548 deletions
diff --git a/pkg/coveragedb/mocks/ReadOnlyTransaction.go b/pkg/coveragedb/mocks/ReadOnlyTransaction.go
index 1a4eecfb8..3f00faca0 100644
--- a/pkg/coveragedb/mocks/ReadOnlyTransaction.go
+++ b/pkg/coveragedb/mocks/ReadOnlyTransaction.go
@@ -1,16 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- context "context"
+ "context"
- spanner "cloud.google.com/go/spanner"
+ "cloud.google.com/go/spanner"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
-
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
)
+// NewReadOnlyTransaction creates a new instance of ReadOnlyTransaction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewReadOnlyTransaction(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *ReadOnlyTransaction {
+ mock := &ReadOnlyTransaction{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// ReadOnlyTransaction is an autogenerated mock type for the ReadOnlyTransaction type
type ReadOnlyTransaction struct {
mock.Mock
@@ -24,23 +39,22 @@ func (_m *ReadOnlyTransaction) EXPECT() *ReadOnlyTransaction_Expecter {
return &ReadOnlyTransaction_Expecter{mock: &_m.Mock}
}
-// Query provides a mock function with given fields: ctx, statement
-func (_m *ReadOnlyTransaction) Query(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator {
- ret := _m.Called(ctx, statement)
+// Query provides a mock function for the type ReadOnlyTransaction
+func (_mock *ReadOnlyTransaction) Query(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator {
+ ret := _mock.Called(ctx, statement)
if len(ret) == 0 {
panic("no return value specified for Query")
}
var r0 spannerclient.RowIterator
- if rf, ok := ret.Get(0).(func(context.Context, spanner.Statement) spannerclient.RowIterator); ok {
- r0 = rf(ctx, statement)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, spanner.Statement) spannerclient.RowIterator); ok {
+ r0 = returnFunc(ctx, statement)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.RowIterator)
}
}
-
return r0
}
@@ -58,31 +72,28 @@ func (_e *ReadOnlyTransaction_Expecter) Query(ctx interface{}, statement interfa
func (_c *ReadOnlyTransaction_Query_Call) Run(run func(ctx context.Context, statement spanner.Statement)) *ReadOnlyTransaction_Query_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(context.Context), args[1].(spanner.Statement))
+ var arg0 context.Context
+ if args[0] != nil {
+ arg0 = args[0].(context.Context)
+ }
+ var arg1 spanner.Statement
+ if args[1] != nil {
+ arg1 = args[1].(spanner.Statement)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ReadOnlyTransaction_Query_Call) Return(_a0 spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
- _c.Call.Return(_a0)
+func (_c *ReadOnlyTransaction_Query_Call) Return(rowIterator spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
+ _c.Call.Return(rowIterator)
return _c
}
-func (_c *ReadOnlyTransaction_Query_Call) RunAndReturn(run func(context.Context, spanner.Statement) spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
+func (_c *ReadOnlyTransaction_Query_Call) RunAndReturn(run func(ctx context.Context, statement spanner.Statement) spannerclient.RowIterator) *ReadOnlyTransaction_Query_Call {
_c.Call.Return(run)
return _c
}
-
-// NewReadOnlyTransaction creates a new instance of ReadOnlyTransaction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewReadOnlyTransaction(t interface {
- mock.TestingT
- Cleanup(func())
-}) *ReadOnlyTransaction {
- mock := &ReadOnlyTransaction{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/Row.go b/pkg/coveragedb/mocks/Row.go
index 549e7d214..3ea716173 100644
--- a/pkg/coveragedb/mocks/Row.go
+++ b/pkg/coveragedb/mocks/Row.go
@@ -1,8 +1,26 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
-import mock "github.com/stretchr/testify/mock"
+import (
+ mock "github.com/stretchr/testify/mock"
+)
+
+// NewRow creates a new instance of Row. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewRow(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Row {
+ mock := &Row{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
// Row is an autogenerated mock type for the Row type
type Row struct {
@@ -17,21 +35,20 @@ func (_m *Row) EXPECT() *Row_Expecter {
return &Row_Expecter{mock: &_m.Mock}
}
-// ToStruct provides a mock function with given fields: p
-func (_m *Row) ToStruct(p interface{}) error {
- ret := _m.Called(p)
+// ToStruct provides a mock function for the type Row
+func (_mock *Row) ToStruct(p interface{}) error {
+ ret := _mock.Called(p)
if len(ret) == 0 {
panic("no return value specified for ToStruct")
}
var r0 error
- if rf, ok := ret.Get(0).(func(interface{}) error); ok {
- r0 = rf(p)
+ if returnFunc, ok := ret.Get(0).(func(interface{}) error); ok {
+ r0 = returnFunc(p)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -48,31 +65,23 @@ func (_e *Row_Expecter) ToStruct(p interface{}) *Row_ToStruct_Call {
func (_c *Row_ToStruct_Call) Run(run func(p interface{})) *Row_ToStruct_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(interface{}))
+ var arg0 interface{}
+ if args[0] != nil {
+ arg0 = args[0].(interface{})
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Row_ToStruct_Call) Return(_a0 error) *Row_ToStruct_Call {
- _c.Call.Return(_a0)
+func (_c *Row_ToStruct_Call) Return(err error) *Row_ToStruct_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Row_ToStruct_Call) RunAndReturn(run func(interface{}) error) *Row_ToStruct_Call {
+func (_c *Row_ToStruct_Call) RunAndReturn(run func(p interface{}) error) *Row_ToStruct_Call {
_c.Call.Return(run)
return _c
}
-
-// NewRow creates a new instance of Row. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewRow(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Row {
- mock := &Row{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/RowIterator.go b/pkg/coveragedb/mocks/RowIterator.go
index 7bea62355..055039af6 100644
--- a/pkg/coveragedb/mocks/RowIterator.go
+++ b/pkg/coveragedb/mocks/RowIterator.go
@@ -1,12 +1,28 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
)
+// NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewRowIterator(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *RowIterator {
+ mock := &RowIterator{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// RowIterator is an autogenerated mock type for the RowIterator type
type RowIterator struct {
mock.Mock
@@ -20,9 +36,9 @@ func (_m *RowIterator) EXPECT() *RowIterator_Expecter {
return &RowIterator_Expecter{mock: &_m.Mock}
}
-// Next provides a mock function with no fields
-func (_m *RowIterator) Next() (spannerclient.Row, error) {
- ret := _m.Called()
+// Next provides a mock function for the type RowIterator
+func (_mock *RowIterator) Next() (spannerclient.Row, error) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Next")
@@ -30,23 +46,21 @@ func (_m *RowIterator) Next() (spannerclient.Row, error) {
var r0 spannerclient.Row
var r1 error
- if rf, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() (spannerclient.Row, error)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() spannerclient.Row); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() spannerclient.Row); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.Row)
}
}
-
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() error); ok {
+ r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -67,8 +81,8 @@ func (_c *RowIterator_Next_Call) Run(run func()) *RowIterator_Next_Call {
return _c
}
-func (_c *RowIterator_Next_Call) Return(_a0 spannerclient.Row, _a1 error) *RowIterator_Next_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *RowIterator_Next_Call) Return(row spannerclient.Row, err error) *RowIterator_Next_Call {
+ _c.Call.Return(row, err)
return _c
}
@@ -77,9 +91,10 @@ func (_c *RowIterator_Next_Call) RunAndReturn(run func() (spannerclient.Row, err
return _c
}
-// Stop provides a mock function with no fields
-func (_m *RowIterator) Stop() {
- _m.Called()
+// Stop provides a mock function for the type RowIterator
+func (_mock *RowIterator) Stop() {
+ _mock.Called()
+ return
}
// RowIterator_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
@@ -108,17 +123,3 @@ func (_c *RowIterator_Stop_Call) RunAndReturn(run func()) *RowIterator_Stop_Call
_c.Run(run)
return _c
}
-
-// NewRowIterator creates a new instance of RowIterator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewRowIterator(t interface {
- mock.TestingT
- Cleanup(func())
-}) *RowIterator {
- mock := &RowIterator{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/coveragedb/mocks/SpannerClient.go b/pkg/coveragedb/mocks/SpannerClient.go
index 0919b57cc..5f5c6cc05 100644
--- a/pkg/coveragedb/mocks/SpannerClient.go
+++ b/pkg/coveragedb/mocks/SpannerClient.go
@@ -1,17 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- context "context"
+ "context"
+ "time"
- spanner "cloud.google.com/go/spanner"
+ "cloud.google.com/go/spanner"
+ "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
mock "github.com/stretchr/testify/mock"
+)
- spannerclient "github.com/google/syzkaller/pkg/coveragedb/spannerclient"
+// NewSpannerClient creates a new instance of SpannerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewSpannerClient(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *SpannerClient {
+ mock := &SpannerClient{}
+ mock.Mock.Test(t)
- time "time"
-)
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
// SpannerClient is an autogenerated mock type for the SpannerClient type
type SpannerClient struct {
@@ -26,16 +40,15 @@ func (_m *SpannerClient) EXPECT() *SpannerClient_Expecter {
return &SpannerClient_Expecter{mock: &_m.Mock}
}
-// Apply provides a mock function with given fields: ctx, ms, opts
-func (_m *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error) {
- _va := make([]interface{}, len(opts))
- for _i := range opts {
- _va[_i] = opts[_i]
+// Apply provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error) {
+ var tmpRet mock.Arguments
+ if len(opts) > 0 {
+ tmpRet = _mock.Called(ctx, ms, opts)
+ } else {
+ tmpRet = _mock.Called(ctx, ms)
}
- var _ca []interface{}
- _ca = append(_ca, ctx, ms)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+ ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for Apply")
@@ -43,21 +56,19 @@ func (_m *SpannerClient) Apply(ctx context.Context, ms []*spanner.Mutation, opts
var r0 time.Time
var r1 error
- if rf, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)); ok {
- return rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)); ok {
+ return returnFunc(ctx, ms, opts...)
}
- if rf, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) time.Time); ok {
- r0 = rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(0).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) time.Time); ok {
+ r0 = returnFunc(ctx, ms, opts...)
} else {
r0 = ret.Get(0).(time.Time)
}
-
- if rf, ok := ret.Get(1).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) error); ok {
- r1 = rf(ctx, ms, opts...)
+ if returnFunc, ok := ret.Get(1).(func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) error); ok {
+ r1 = returnFunc(ctx, ms, opts...)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -77,13 +88,25 @@ func (_e *SpannerClient_Expecter) Apply(ctx interface{}, ms interface{}, opts ..
func (_c *SpannerClient_Apply_Call) Run(run func(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption)) *SpannerClient_Apply_Call {
_c.Call.Run(func(args mock.Arguments) {
- variadicArgs := make([]spanner.ApplyOption, len(args)-2)
- for i, a := range args[2:] {
- if a != nil {
- variadicArgs[i] = a.(spanner.ApplyOption)
- }
+ var arg0 context.Context
+ if args[0] != nil {
+ arg0 = args[0].(context.Context)
}
- run(args[0].(context.Context), args[1].([]*spanner.Mutation), variadicArgs...)
+ var arg1 []*spanner.Mutation
+ if args[1] != nil {
+ arg1 = args[1].([]*spanner.Mutation)
+ }
+ var arg2 []spanner.ApplyOption
+ var variadicArgs []spanner.ApplyOption
+ if len(args) > 2 {
+ variadicArgs = args[2].([]spanner.ApplyOption)
+ }
+ arg2 = variadicArgs
+ run(
+ arg0,
+ arg1,
+ arg2...,
+ )
})
return _c
}
@@ -93,14 +116,15 @@ func (_c *SpannerClient_Apply_Call) Return(commitTimestamp time.Time, err error)
return _c
}
-func (_c *SpannerClient_Apply_Call) RunAndReturn(run func(context.Context, []*spanner.Mutation, ...spanner.ApplyOption) (time.Time, error)) *SpannerClient_Apply_Call {
+func (_c *SpannerClient_Apply_Call) RunAndReturn(run func(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (time.Time, error)) *SpannerClient_Apply_Call {
_c.Call.Return(run)
return _c
}
-// Close provides a mock function with no fields
-func (_m *SpannerClient) Close() {
- _m.Called()
+// Close provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Close() {
+ _mock.Called()
+ return
}
// SpannerClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
@@ -130,23 +154,22 @@ func (_c *SpannerClient_Close_Call) RunAndReturn(run func()) *SpannerClient_Clos
return _c
}
-// Single provides a mock function with no fields
-func (_m *SpannerClient) Single() spannerclient.ReadOnlyTransaction {
- ret := _m.Called()
+// Single provides a mock function for the type SpannerClient
+func (_mock *SpannerClient) Single() spannerclient.ReadOnlyTransaction {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Single")
}
var r0 spannerclient.ReadOnlyTransaction
- if rf, ok := ret.Get(0).(func() spannerclient.ReadOnlyTransaction); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() spannerclient.ReadOnlyTransaction); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spannerclient.ReadOnlyTransaction)
}
}
-
return r0
}
@@ -167,8 +190,8 @@ func (_c *SpannerClient_Single_Call) Run(run func()) *SpannerClient_Single_Call
return _c
}
-func (_c *SpannerClient_Single_Call) Return(_a0 spannerclient.ReadOnlyTransaction) *SpannerClient_Single_Call {
- _c.Call.Return(_a0)
+func (_c *SpannerClient_Single_Call) Return(readOnlyTransaction spannerclient.ReadOnlyTransaction) *SpannerClient_Single_Call {
+ _c.Call.Return(readOnlyTransaction)
return _c
}
@@ -176,17 +199,3 @@ func (_c *SpannerClient_Single_Call) RunAndReturn(run func() spannerclient.ReadO
_c.Call.Return(run)
return _c
}
-
-// NewSpannerClient creates a new instance of SpannerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewSpannerClient(t interface {
- mock.TestingT
- Cleanup(func())
-}) *SpannerClient {
- mock := &SpannerClient{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/covermerger/mocks/FileVersProvider.go b/pkg/covermerger/mocks/FileVersProvider.go
index 4e07532bd..4c0709874 100644
--- a/pkg/covermerger/mocks/FileVersProvider.go
+++ b/pkg/covermerger/mocks/FileVersProvider.go
@@ -1,12 +1,28 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- covermerger "github.com/google/syzkaller/pkg/covermerger"
+ "github.com/google/syzkaller/pkg/covermerger"
mock "github.com/stretchr/testify/mock"
)
+// NewFileVersProvider creates a new instance of FileVersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewFileVersProvider(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *FileVersProvider {
+ mock := &FileVersProvider{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// FileVersProvider is an autogenerated mock type for the FileVersProvider type
type FileVersProvider struct {
mock.Mock
@@ -20,16 +36,15 @@ func (_m *FileVersProvider) EXPECT() *FileVersProvider_Expecter {
return &FileVersProvider_Expecter{mock: &_m.Mock}
}
-// GetFileVersions provides a mock function with given fields: targetFilePath, repoCommits
-func (_m *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error) {
- _va := make([]interface{}, len(repoCommits))
- for _i := range repoCommits {
- _va[_i] = repoCommits[_i]
+// GetFileVersions provides a mock function for the type FileVersProvider
+func (_mock *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error) {
+ var tmpRet mock.Arguments
+ if len(repoCommits) > 0 {
+ tmpRet = _mock.Called(targetFilePath, repoCommits)
+ } else {
+ tmpRet = _mock.Called(targetFilePath)
}
- var _ca []interface{}
- _ca = append(_ca, targetFilePath)
- _ca = append(_ca, _va...)
- ret := _m.Called(_ca...)
+ ret := tmpRet
if len(ret) == 0 {
panic("no return value specified for GetFileVersions")
@@ -37,23 +52,21 @@ func (_m *FileVersProvider) GetFileVersions(targetFilePath string, repoCommits .
var r0 covermerger.FileVersions
var r1 error
- if rf, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)); ok {
- return rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)); ok {
+ return returnFunc(targetFilePath, repoCommits...)
}
- if rf, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) covermerger.FileVersions); ok {
- r0 = rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(0).(func(string, ...covermerger.RepoCommit) covermerger.FileVersions); ok {
+ r0 = returnFunc(targetFilePath, repoCommits...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(covermerger.FileVersions)
}
}
-
- if rf, ok := ret.Get(1).(func(string, ...covermerger.RepoCommit) error); ok {
- r1 = rf(targetFilePath, repoCommits...)
+ if returnFunc, ok := ret.Get(1).(func(string, ...covermerger.RepoCommit) error); ok {
+ r1 = returnFunc(targetFilePath, repoCommits...)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -72,37 +85,30 @@ func (_e *FileVersProvider_Expecter) GetFileVersions(targetFilePath interface{},
func (_c *FileVersProvider_GetFileVersions_Call) Run(run func(targetFilePath string, repoCommits ...covermerger.RepoCommit)) *FileVersProvider_GetFileVersions_Call {
_c.Call.Run(func(args mock.Arguments) {
- variadicArgs := make([]covermerger.RepoCommit, len(args)-1)
- for i, a := range args[1:] {
- if a != nil {
- variadicArgs[i] = a.(covermerger.RepoCommit)
- }
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ var arg1 []covermerger.RepoCommit
+ var variadicArgs []covermerger.RepoCommit
+ if len(args) > 1 {
+ variadicArgs = args[1].([]covermerger.RepoCommit)
}
- run(args[0].(string), variadicArgs...)
+ arg1 = variadicArgs
+ run(
+ arg0,
+ arg1...,
+ )
})
return _c
}
-func (_c *FileVersProvider_GetFileVersions_Call) Return(_a0 covermerger.FileVersions, _a1 error) *FileVersProvider_GetFileVersions_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *FileVersProvider_GetFileVersions_Call) Return(fileVersions covermerger.FileVersions, err error) *FileVersProvider_GetFileVersions_Call {
+ _c.Call.Return(fileVersions, err)
return _c
}
-func (_c *FileVersProvider_GetFileVersions_Call) RunAndReturn(run func(string, ...covermerger.RepoCommit) (covermerger.FileVersions, error)) *FileVersProvider_GetFileVersions_Call {
+func (_c *FileVersProvider_GetFileVersions_Call) RunAndReturn(run func(targetFilePath string, repoCommits ...covermerger.RepoCommit) (covermerger.FileVersions, error)) *FileVersProvider_GetFileVersions_Call {
_c.Call.Return(run)
return _c
}
-
-// NewFileVersProvider creates a new instance of FileVersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewFileVersProvider(t interface {
- mock.TestingT
- Cleanup(func())
-}) *FileVersProvider {
- mock := &FileVersProvider{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/gcs/mocks/Client.go b/pkg/gcs/mocks/Client.go
index d422b9c41..c8d2501f5 100644
--- a/pkg/gcs/mocks/Client.go
+++ b/pkg/gcs/mocks/Client.go
@@ -1,15 +1,30 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- io "io"
-
- gcs "github.com/google/syzkaller/pkg/gcs"
+ "io"
+ "github.com/google/syzkaller/pkg/gcs"
mock "github.com/stretchr/testify/mock"
)
+// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewClient(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Client {
+ mock := &Client{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
@@ -23,21 +38,20 @@ func (_m *Client) EXPECT() *Client_Expecter {
return &Client_Expecter{mock: &_m.Mock}
}
-// Close provides a mock function with no fields
-func (_m *Client) Close() error {
- ret := _m.Called()
+// Close provides a mock function for the type Client
+func (_mock *Client) Close() error {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() error); ok {
+ r0 = returnFunc()
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -58,8 +72,8 @@ func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call {
return _c
}
-func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call {
- _c.Call.Return(_a0)
+func (_c *Client_Close_Call) Return(err error) *Client_Close_Call {
+ _c.Call.Return(err)
return _c
}
@@ -68,21 +82,20 @@ func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call {
return _c
}
-// DeleteFile provides a mock function with given fields: path
-func (_m *Client) DeleteFile(path string) error {
- ret := _m.Called(path)
+// DeleteFile provides a mock function for the type Client
+func (_mock *Client) DeleteFile(path string) error {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for DeleteFile")
}
var r0 error
- if rf, ok := ret.Get(0).(func(string) error); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) error); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -99,24 +112,30 @@ func (_e *Client_Expecter) DeleteFile(path interface{}) *Client_DeleteFile_Call
func (_c *Client_DeleteFile_Call) Run(run func(path string)) *Client_DeleteFile_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_DeleteFile_Call) Return(_a0 error) *Client_DeleteFile_Call {
- _c.Call.Return(_a0)
+func (_c *Client_DeleteFile_Call) Return(err error) *Client_DeleteFile_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Client_DeleteFile_Call) RunAndReturn(run func(string) error) *Client_DeleteFile_Call {
+func (_c *Client_DeleteFile_Call) RunAndReturn(run func(path string) error) *Client_DeleteFile_Call {
_c.Call.Return(run)
return _c
}
-// FileExists provides a mock function with given fields: path
-func (_m *Client) FileExists(path string) (bool, error) {
- ret := _m.Called(path)
+// FileExists provides a mock function for the type Client
+func (_mock *Client) FileExists(path string) (bool, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileExists")
@@ -124,21 +143,19 @@ func (_m *Client) FileExists(path string) (bool, error) {
var r0 bool
var r1 error
- if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) bool); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Get(0).(bool)
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -155,24 +172,30 @@ func (_e *Client_Expecter) FileExists(path interface{}) *Client_FileExists_Call
func (_c *Client_FileExists_Call) Run(run func(path string)) *Client_FileExists_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_FileExists_Call) Return(_a0 bool, _a1 error) *Client_FileExists_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileExists_Call) Return(b bool, err error) *Client_FileExists_Call {
+ _c.Call.Return(b, err)
return _c
}
-func (_c *Client_FileExists_Call) RunAndReturn(run func(string) (bool, error)) *Client_FileExists_Call {
+func (_c *Client_FileExists_Call) RunAndReturn(run func(path string) (bool, error)) *Client_FileExists_Call {
_c.Call.Return(run)
return _c
}
-// FileReader provides a mock function with given fields: path
-func (_m *Client) FileReader(path string) (io.ReadCloser, error) {
- ret := _m.Called(path)
+// FileReader provides a mock function for the type Client
+func (_mock *Client) FileReader(path string) (io.ReadCloser, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileReader")
@@ -180,23 +203,21 @@ func (_m *Client) FileReader(path string) (io.ReadCloser, error) {
var r0 io.ReadCloser
var r1 error
- if rf, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
+ r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -213,24 +234,30 @@ func (_e *Client_Expecter) FileReader(path interface{}) *Client_FileReader_Call
func (_c *Client_FileReader_Call) Run(run func(path string)) *Client_FileReader_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_FileReader_Call) Return(_a0 io.ReadCloser, _a1 error) *Client_FileReader_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileReader_Call) Return(readCloser io.ReadCloser, err error) *Client_FileReader_Call {
+ _c.Call.Return(readCloser, err)
return _c
}
-func (_c *Client_FileReader_Call) RunAndReturn(run func(string) (io.ReadCloser, error)) *Client_FileReader_Call {
+func (_c *Client_FileReader_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *Client_FileReader_Call {
_c.Call.Return(run)
return _c
}
-// FileWriter provides a mock function with given fields: path, contentType, contentEncoding
-func (_m *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
- ret := _m.Called(path, contentType, contentEncoding)
+// FileWriter provides a mock function for the type Client
+func (_mock *Client) FileWriter(path string, contentType string, contentEncoding string) (io.WriteCloser, error) {
+ ret := _mock.Called(path, contentType, contentEncoding)
if len(ret) == 0 {
panic("no return value specified for FileWriter")
@@ -238,23 +265,21 @@ func (_m *Client) FileWriter(path string, contentType string, contentEncoding st
var r0 io.WriteCloser
var r1 error
- if rf, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
- return rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(0).(func(string, string, string) (io.WriteCloser, error)); ok {
+ return returnFunc(path, contentType, contentEncoding)
}
- if rf, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
- r0 = rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(0).(func(string, string, string) io.WriteCloser); ok {
+ r0 = returnFunc(path, contentType, contentEncoding)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.WriteCloser)
}
}
-
- if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
- r1 = rf(path, contentType, contentEncoding)
+ if returnFunc, ok := ret.Get(1).(func(string, string, string) error); ok {
+ r1 = returnFunc(path, contentType, contentEncoding)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -273,24 +298,40 @@ func (_e *Client_Expecter) FileWriter(path interface{}, contentType interface{},
func (_c *Client_FileWriter_Call) Run(run func(path string, contentType string, contentEncoding string)) *Client_FileWriter_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string), args[1].(string), args[2].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ var arg1 string
+ if args[1] != nil {
+ arg1 = args[1].(string)
+ }
+ var arg2 string
+ if args[2] != nil {
+ arg2 = args[2].(string)
+ }
+ run(
+ arg0,
+ arg1,
+ arg2,
+ )
})
return _c
}
-func (_c *Client_FileWriter_Call) Return(_a0 io.WriteCloser, _a1 error) *Client_FileWriter_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_FileWriter_Call) Return(writeCloser io.WriteCloser, err error) *Client_FileWriter_Call {
+ _c.Call.Return(writeCloser, err)
return _c
}
-func (_c *Client_FileWriter_Call) RunAndReturn(run func(string, string, string) (io.WriteCloser, error)) *Client_FileWriter_Call {
+func (_c *Client_FileWriter_Call) RunAndReturn(run func(path string, contentType string, contentEncoding string) (io.WriteCloser, error)) *Client_FileWriter_Call {
_c.Call.Return(run)
return _c
}
-// ListObjects provides a mock function with given fields: path
-func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
- ret := _m.Called(path)
+// ListObjects provides a mock function for the type Client
+func (_mock *Client) ListObjects(path string) ([]*gcs.Object, error) {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for ListObjects")
@@ -298,23 +339,21 @@ func (_m *Client) ListObjects(path string) ([]*gcs.Object, error) {
var r0 []*gcs.Object
var r1 error
- if rf, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
- return rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) ([]*gcs.Object, error)); ok {
+ return returnFunc(path)
}
- if rf, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) []*gcs.Object); ok {
+ r0 = returnFunc(path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*gcs.Object)
}
}
-
- if rf, ok := ret.Get(1).(func(string) error); ok {
- r1 = rf(path)
+ if returnFunc, ok := ret.Get(1).(func(string) error); ok {
+ r1 = returnFunc(path)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -331,36 +370,41 @@ func (_e *Client_Expecter) ListObjects(path interface{}) *Client_ListObjects_Cal
func (_c *Client_ListObjects_Call) Run(run func(path string)) *Client_ListObjects_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_ListObjects_Call) Return(_a0 []*gcs.Object, _a1 error) *Client_ListObjects_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Client_ListObjects_Call) Return(objects []*gcs.Object, err error) *Client_ListObjects_Call {
+ _c.Call.Return(objects, err)
return _c
}
-func (_c *Client_ListObjects_Call) RunAndReturn(run func(string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
+func (_c *Client_ListObjects_Call) RunAndReturn(run func(path string) ([]*gcs.Object, error)) *Client_ListObjects_Call {
_c.Call.Return(run)
return _c
}
-// Publish provides a mock function with given fields: path
-func (_m *Client) Publish(path string) error {
- ret := _m.Called(path)
+// Publish provides a mock function for the type Client
+func (_mock *Client) Publish(path string) error {
+ ret := _mock.Called(path)
if len(ret) == 0 {
panic("no return value specified for Publish")
}
var r0 error
- if rf, ok := ret.Get(0).(func(string) error); ok {
- r0 = rf(path)
+ if returnFunc, ok := ret.Get(0).(func(string) error); ok {
+ r0 = returnFunc(path)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -377,31 +421,23 @@ func (_e *Client_Expecter) Publish(path interface{}) *Client_Publish_Call {
func (_c *Client_Publish_Call) Run(run func(path string)) *Client_Publish_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(string))
+ var arg0 string
+ if args[0] != nil {
+ arg0 = args[0].(string)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Client_Publish_Call) Return(_a0 error) *Client_Publish_Call {
- _c.Call.Return(_a0)
+func (_c *Client_Publish_Call) Return(err error) *Client_Publish_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *Client_Publish_Call) RunAndReturn(run func(string) error) *Client_Publish_Call {
+func (_c *Client_Publish_Call) RunAndReturn(run func(path string) error) *Client_Publish_Call {
_c.Call.Return(run)
return _c
}
-
-// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewClient(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Client {
- mock := &Client{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/pkg/rpcserver/mocks/Manager.go b/pkg/rpcserver/mocks/Manager.go
index 717205338..40cff2553 100644
--- a/pkg/rpcserver/mocks/Manager.go
+++ b/pkg/rpcserver/mocks/Manager.go
@@ -1,19 +1,31 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- flatrpc "github.com/google/syzkaller/pkg/flatrpc"
+ "github.com/google/syzkaller/pkg/flatrpc"
+ "github.com/google/syzkaller/pkg/fuzzer/queue"
+ "github.com/google/syzkaller/pkg/signal"
+ "github.com/google/syzkaller/pkg/vminfo"
+ "github.com/google/syzkaller/prog"
mock "github.com/stretchr/testify/mock"
+)
- prog "github.com/google/syzkaller/prog"
-
- queue "github.com/google/syzkaller/pkg/fuzzer/queue"
+// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewManager(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *Manager {
+ mock := &Manager{}
+ mock.Mock.Test(t)
- signal "github.com/google/syzkaller/pkg/signal"
+ t.Cleanup(func() { mock.AssertExpectations(t) })
- vminfo "github.com/google/syzkaller/pkg/vminfo"
-)
+ return mock
+}
// Manager is an autogenerated mock type for the Manager type
type Manager struct {
@@ -28,9 +40,9 @@ func (_m *Manager) EXPECT() *Manager_Expecter {
return &Manager_Expecter{mock: &_m.Mock}
}
-// BugFrames provides a mock function with no fields
-func (_m *Manager) BugFrames() ([]string, []string) {
- ret := _m.Called()
+// BugFrames provides a mock function for the type Manager
+func (_mock *Manager) BugFrames() ([]string, []string) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for BugFrames")
@@ -38,25 +50,23 @@ func (_m *Manager) BugFrames() ([]string, []string) {
var r0 []string
var r1 []string
- if rf, ok := ret.Get(0).(func() ([]string, []string)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() ([]string, []string)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() []string); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() []string); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
-
- if rf, ok := ret.Get(1).(func() []string); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() []string); ok {
+ r1 = returnFunc()
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]string)
}
}
-
return r0, r1
}
@@ -87,9 +97,9 @@ func (_c *Manager_BugFrames_Call) RunAndReturn(run func() ([]string, []string))
return _c
}
-// CoverageFilter provides a mock function with given fields: modules
-func (_m *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, error) {
- ret := _m.Called(modules)
+// CoverageFilter provides a mock function for the type Manager
+func (_mock *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, error) {
+ ret := _mock.Called(modules)
if len(ret) == 0 {
panic("no return value specified for CoverageFilter")
@@ -97,23 +107,21 @@ func (_m *Manager) CoverageFilter(modules []*vminfo.KernelModule) ([]uint64, err
var r0 []uint64
var r1 error
- if rf, ok := ret.Get(0).(func([]*vminfo.KernelModule) ([]uint64, error)); ok {
- return rf(modules)
+ if returnFunc, ok := ret.Get(0).(func([]*vminfo.KernelModule) ([]uint64, error)); ok {
+ return returnFunc(modules)
}
- if rf, ok := ret.Get(0).(func([]*vminfo.KernelModule) []uint64); ok {
- r0 = rf(modules)
+ if returnFunc, ok := ret.Get(0).(func([]*vminfo.KernelModule) []uint64); ok {
+ r0 = returnFunc(modules)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]uint64)
}
}
-
- if rf, ok := ret.Get(1).(func([]*vminfo.KernelModule) error); ok {
- r1 = rf(modules)
+ if returnFunc, ok := ret.Get(1).(func([]*vminfo.KernelModule) error); ok {
+ r1 = returnFunc(modules)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -130,24 +138,30 @@ func (_e *Manager_Expecter) CoverageFilter(modules interface{}) *Manager_Coverag
func (_c *Manager_CoverageFilter_Call) Run(run func(modules []*vminfo.KernelModule)) *Manager_CoverageFilter_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].([]*vminfo.KernelModule))
+ var arg0 []*vminfo.KernelModule
+ if args[0] != nil {
+ arg0 = args[0].([]*vminfo.KernelModule)
+ }
+ run(
+ arg0,
+ )
})
return _c
}
-func (_c *Manager_CoverageFilter_Call) Return(_a0 []uint64, _a1 error) *Manager_CoverageFilter_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Manager_CoverageFilter_Call) Return(uint64s []uint64, err error) *Manager_CoverageFilter_Call {
+ _c.Call.Return(uint64s, err)
return _c
}
-func (_c *Manager_CoverageFilter_Call) RunAndReturn(run func([]*vminfo.KernelModule) ([]uint64, error)) *Manager_CoverageFilter_Call {
+func (_c *Manager_CoverageFilter_Call) RunAndReturn(run func(modules []*vminfo.KernelModule) ([]uint64, error)) *Manager_CoverageFilter_Call {
_c.Call.Return(run)
return _c
}
-// MachineChecked provides a mock function with given fields: features, syscalls
-func (_m *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error) {
- ret := _m.Called(features, syscalls)
+// MachineChecked provides a mock function for the type Manager
+func (_mock *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error) {
+ ret := _mock.Called(features, syscalls)
if len(ret) == 0 {
panic("no return value specified for MachineChecked")
@@ -155,23 +169,21 @@ func (_m *Manager) MachineChecked(features flatrpc.Feature, syscalls map[*prog.S
var r0 queue.Source
var r1 error
- if rf, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)); ok {
- return rf(features, syscalls)
+ if returnFunc, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)); ok {
+ return returnFunc(features, syscalls)
}
- if rf, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) queue.Source); ok {
- r0 = rf(features, syscalls)
+ if returnFunc, ok := ret.Get(0).(func(flatrpc.Feature, map[*prog.Syscall]bool) queue.Source); ok {
+ r0 = returnFunc(features, syscalls)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(queue.Source)
}
}
-
- if rf, ok := ret.Get(1).(func(flatrpc.Feature, map[*prog.Syscall]bool) error); ok {
- r1 = rf(features, syscalls)
+ if returnFunc, ok := ret.Get(1).(func(flatrpc.Feature, map[*prog.Syscall]bool) error); ok {
+ r1 = returnFunc(features, syscalls)
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -189,38 +201,48 @@ func (_e *Manager_Expecter) MachineChecked(features interface{}, syscalls interf
func (_c *Manager_MachineChecked_Call) Run(run func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool)) *Manager_MachineChecked_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(flatrpc.Feature), args[1].(map[*prog.Syscall]bool))
+ var arg0 flatrpc.Feature
+ if args[0] != nil {
+ arg0 = args[0].(flatrpc.Feature)
+ }
+ var arg1 map[*prog.Syscall]bool
+ if args[1] != nil {
+ arg1 = args[1].(map[*prog.Syscall]bool)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *Manager_MachineChecked_Call) Return(_a0 queue.Source, _a1 error) *Manager_MachineChecked_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *Manager_MachineChecked_Call) Return(source queue.Source, err error) *Manager_MachineChecked_Call {
+ _c.Call.Return(source, err)
return _c
}
-func (_c *Manager_MachineChecked_Call) RunAndReturn(run func(flatrpc.Feature, map[*prog.Syscall]bool) (queue.Source, error)) *Manager_MachineChecked_Call {
+func (_c *Manager_MachineChecked_Call) RunAndReturn(run func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) (queue.Source, error)) *Manager_MachineChecked_Call {
_c.Call.Return(run)
return _c
}
-// MaxSignal provides a mock function with no fields
-func (_m *Manager) MaxSignal() signal.Signal {
- ret := _m.Called()
+// MaxSignal provides a mock function for the type Manager
+func (_mock *Manager) MaxSignal() signal.Signal {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for MaxSignal")
}
var r0 signal.Signal
- if rf, ok := ret.Get(0).(func() signal.Signal); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() signal.Signal); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(signal.Signal)
}
}
-
return r0
}
@@ -241,8 +263,8 @@ func (_c *Manager_MaxSignal_Call) Run(run func()) *Manager_MaxSignal_Call {
return _c
}
-func (_c *Manager_MaxSignal_Call) Return(_a0 signal.Signal) *Manager_MaxSignal_Call {
- _c.Call.Return(_a0)
+func (_c *Manager_MaxSignal_Call) Return(signal1 signal.Signal) *Manager_MaxSignal_Call {
+ _c.Call.Return(signal1)
return _c
}
@@ -250,17 +272,3 @@ func (_c *Manager_MaxSignal_Call) RunAndReturn(run func() signal.Signal) *Manage
_c.Call.Return(run)
return _c
}
-
-// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewManager(t interface {
- mock.TestingT
- Cleanup(func())
-}) *Manager {
- mock := &Manager{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/vm/proxyapp/mocks/ProxyAppInterface.go b/vm/proxyapp/mocks/ProxyAppInterface.go
index a79afbb0e..0255990cc 100644
--- a/vm/proxyapp/mocks/ProxyAppInterface.go
+++ b/vm/proxyapp/mocks/ProxyAppInterface.go
@@ -1,12 +1,28 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- proxyrpc "github.com/google/syzkaller/vm/proxyapp/proxyrpc"
+ "github.com/google/syzkaller/vm/proxyapp/proxyrpc"
mock "github.com/stretchr/testify/mock"
)
+// NewProxyAppInterface creates a new instance of ProxyAppInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewProxyAppInterface(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *ProxyAppInterface {
+ mock := &ProxyAppInterface{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// ProxyAppInterface is an autogenerated mock type for the ProxyAppInterface type
type ProxyAppInterface struct {
mock.Mock
@@ -20,21 +36,20 @@ func (_m *ProxyAppInterface) EXPECT() *ProxyAppInterface_Expecter {
return &ProxyAppInterface_Expecter{mock: &_m.Mock}
}
-// Close provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) Close(in proxyrpc.CloseParams, out *proxyrpc.CloseReply) error {
- ret := _m.Called(in, out)
+// Close provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) Close(in proxyrpc.CloseParams, out *proxyrpc.CloseReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.CloseParams, *proxyrpc.CloseReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.CloseParams, *proxyrpc.CloseReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -52,36 +67,46 @@ func (_e *ProxyAppInterface_Expecter) Close(in interface{}, out interface{}) *Pr
func (_c *ProxyAppInterface_Close_Call) Run(run func(in proxyrpc.CloseParams, out *proxyrpc.CloseReply)) *ProxyAppInterface_Close_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.CloseParams), args[1].(*proxyrpc.CloseReply))
+ var arg0 proxyrpc.CloseParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.CloseParams)
+ }
+ var arg1 *proxyrpc.CloseReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.CloseReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_Close_Call) Return(_a0 error) *ProxyAppInterface_Close_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_Close_Call) Return(err error) *ProxyAppInterface_Close_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_Close_Call) RunAndReturn(run func(proxyrpc.CloseParams, *proxyrpc.CloseReply) error) *ProxyAppInterface_Close_Call {
+func (_c *ProxyAppInterface_Close_Call) RunAndReturn(run func(in proxyrpc.CloseParams, out *proxyrpc.CloseReply) error) *ProxyAppInterface_Close_Call {
_c.Call.Return(run)
return _c
}
-// Copy provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) Copy(in proxyrpc.CopyParams, out *proxyrpc.CopyResult) error {
- ret := _m.Called(in, out)
+// Copy provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) Copy(in proxyrpc.CopyParams, out *proxyrpc.CopyResult) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for Copy")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.CopyParams, *proxyrpc.CopyResult) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.CopyParams, *proxyrpc.CopyResult) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -99,36 +124,46 @@ func (_e *ProxyAppInterface_Expecter) Copy(in interface{}, out interface{}) *Pro
func (_c *ProxyAppInterface_Copy_Call) Run(run func(in proxyrpc.CopyParams, out *proxyrpc.CopyResult)) *ProxyAppInterface_Copy_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.CopyParams), args[1].(*proxyrpc.CopyResult))
+ var arg0 proxyrpc.CopyParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.CopyParams)
+ }
+ var arg1 *proxyrpc.CopyResult
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.CopyResult)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_Copy_Call) Return(_a0 error) *ProxyAppInterface_Copy_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_Copy_Call) Return(err error) *ProxyAppInterface_Copy_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_Copy_Call) RunAndReturn(run func(proxyrpc.CopyParams, *proxyrpc.CopyResult) error) *ProxyAppInterface_Copy_Call {
+func (_c *ProxyAppInterface_Copy_Call) RunAndReturn(run func(in proxyrpc.CopyParams, out *proxyrpc.CopyResult) error) *ProxyAppInterface_Copy_Call {
_c.Call.Return(run)
return _c
}
-// CreateInstance provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) CreateInstance(in proxyrpc.CreateInstanceParams, out *proxyrpc.CreateInstanceResult) error {
- ret := _m.Called(in, out)
+// CreateInstance provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) CreateInstance(in proxyrpc.CreateInstanceParams, out *proxyrpc.CreateInstanceResult) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for CreateInstance")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.CreateInstanceParams, *proxyrpc.CreateInstanceResult) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.CreateInstanceParams, *proxyrpc.CreateInstanceResult) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -146,36 +181,46 @@ func (_e *ProxyAppInterface_Expecter) CreateInstance(in interface{}, out interfa
func (_c *ProxyAppInterface_CreateInstance_Call) Run(run func(in proxyrpc.CreateInstanceParams, out *proxyrpc.CreateInstanceResult)) *ProxyAppInterface_CreateInstance_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.CreateInstanceParams), args[1].(*proxyrpc.CreateInstanceResult))
+ var arg0 proxyrpc.CreateInstanceParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.CreateInstanceParams)
+ }
+ var arg1 *proxyrpc.CreateInstanceResult
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.CreateInstanceResult)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_CreateInstance_Call) Return(_a0 error) *ProxyAppInterface_CreateInstance_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_CreateInstance_Call) Return(err error) *ProxyAppInterface_CreateInstance_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_CreateInstance_Call) RunAndReturn(run func(proxyrpc.CreateInstanceParams, *proxyrpc.CreateInstanceResult) error) *ProxyAppInterface_CreateInstance_Call {
+func (_c *ProxyAppInterface_CreateInstance_Call) RunAndReturn(run func(in proxyrpc.CreateInstanceParams, out *proxyrpc.CreateInstanceResult) error) *ProxyAppInterface_CreateInstance_Call {
_c.Call.Return(run)
return _c
}
-// CreatePool provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) CreatePool(in proxyrpc.CreatePoolParams, out *proxyrpc.CreatePoolResult) error {
- ret := _m.Called(in, out)
+// CreatePool provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) CreatePool(in proxyrpc.CreatePoolParams, out *proxyrpc.CreatePoolResult) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for CreatePool")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.CreatePoolParams, *proxyrpc.CreatePoolResult) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.CreatePoolParams, *proxyrpc.CreatePoolResult) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -193,36 +238,46 @@ func (_e *ProxyAppInterface_Expecter) CreatePool(in interface{}, out interface{}
func (_c *ProxyAppInterface_CreatePool_Call) Run(run func(in proxyrpc.CreatePoolParams, out *proxyrpc.CreatePoolResult)) *ProxyAppInterface_CreatePool_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.CreatePoolParams), args[1].(*proxyrpc.CreatePoolResult))
+ var arg0 proxyrpc.CreatePoolParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.CreatePoolParams)
+ }
+ var arg1 *proxyrpc.CreatePoolResult
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.CreatePoolResult)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_CreatePool_Call) Return(_a0 error) *ProxyAppInterface_CreatePool_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_CreatePool_Call) Return(err error) *ProxyAppInterface_CreatePool_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_CreatePool_Call) RunAndReturn(run func(proxyrpc.CreatePoolParams, *proxyrpc.CreatePoolResult) error) *ProxyAppInterface_CreatePool_Call {
+func (_c *ProxyAppInterface_CreatePool_Call) RunAndReturn(run func(in proxyrpc.CreatePoolParams, out *proxyrpc.CreatePoolResult) error) *ProxyAppInterface_CreatePool_Call {
_c.Call.Return(run)
return _c
}
-// Diagnose provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) Diagnose(in proxyrpc.DiagnoseParams, out *proxyrpc.DiagnoseReply) error {
- ret := _m.Called(in, out)
+// Diagnose provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) Diagnose(in proxyrpc.DiagnoseParams, out *proxyrpc.DiagnoseReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for Diagnose")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.DiagnoseParams, *proxyrpc.DiagnoseReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.DiagnoseParams, *proxyrpc.DiagnoseReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -240,36 +295,46 @@ func (_e *ProxyAppInterface_Expecter) Diagnose(in interface{}, out interface{})
func (_c *ProxyAppInterface_Diagnose_Call) Run(run func(in proxyrpc.DiagnoseParams, out *proxyrpc.DiagnoseReply)) *ProxyAppInterface_Diagnose_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.DiagnoseParams), args[1].(*proxyrpc.DiagnoseReply))
+ var arg0 proxyrpc.DiagnoseParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.DiagnoseParams)
+ }
+ var arg1 *proxyrpc.DiagnoseReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.DiagnoseReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_Diagnose_Call) Return(_a0 error) *ProxyAppInterface_Diagnose_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_Diagnose_Call) Return(err error) *ProxyAppInterface_Diagnose_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_Diagnose_Call) RunAndReturn(run func(proxyrpc.DiagnoseParams, *proxyrpc.DiagnoseReply) error) *ProxyAppInterface_Diagnose_Call {
+func (_c *ProxyAppInterface_Diagnose_Call) RunAndReturn(run func(in proxyrpc.DiagnoseParams, out *proxyrpc.DiagnoseReply) error) *ProxyAppInterface_Diagnose_Call {
_c.Call.Return(run)
return _c
}
-// Forward provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) Forward(in proxyrpc.ForwardParams, out *proxyrpc.ForwardResult) error {
- ret := _m.Called(in, out)
+// Forward provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) Forward(in proxyrpc.ForwardParams, out *proxyrpc.ForwardResult) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for Forward")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.ForwardParams, *proxyrpc.ForwardResult) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.ForwardParams, *proxyrpc.ForwardResult) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -287,36 +352,46 @@ func (_e *ProxyAppInterface_Expecter) Forward(in interface{}, out interface{}) *
func (_c *ProxyAppInterface_Forward_Call) Run(run func(in proxyrpc.ForwardParams, out *proxyrpc.ForwardResult)) *ProxyAppInterface_Forward_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.ForwardParams), args[1].(*proxyrpc.ForwardResult))
+ var arg0 proxyrpc.ForwardParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.ForwardParams)
+ }
+ var arg1 *proxyrpc.ForwardResult
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.ForwardResult)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_Forward_Call) Return(_a0 error) *ProxyAppInterface_Forward_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_Forward_Call) Return(err error) *ProxyAppInterface_Forward_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_Forward_Call) RunAndReturn(run func(proxyrpc.ForwardParams, *proxyrpc.ForwardResult) error) *ProxyAppInterface_Forward_Call {
+func (_c *ProxyAppInterface_Forward_Call) RunAndReturn(run func(in proxyrpc.ForwardParams, out *proxyrpc.ForwardResult) error) *ProxyAppInterface_Forward_Call {
_c.Call.Return(run)
return _c
}
-// PoolLogs provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) PoolLogs(in proxyrpc.PoolLogsParam, out *proxyrpc.PoolLogsReply) error {
- ret := _m.Called(in, out)
+// PoolLogs provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) PoolLogs(in proxyrpc.PoolLogsParam, out *proxyrpc.PoolLogsReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for PoolLogs")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.PoolLogsParam, *proxyrpc.PoolLogsReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.PoolLogsParam, *proxyrpc.PoolLogsReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -334,36 +409,46 @@ func (_e *ProxyAppInterface_Expecter) PoolLogs(in interface{}, out interface{})
func (_c *ProxyAppInterface_PoolLogs_Call) Run(run func(in proxyrpc.PoolLogsParam, out *proxyrpc.PoolLogsReply)) *ProxyAppInterface_PoolLogs_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.PoolLogsParam), args[1].(*proxyrpc.PoolLogsReply))
+ var arg0 proxyrpc.PoolLogsParam
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.PoolLogsParam)
+ }
+ var arg1 *proxyrpc.PoolLogsReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.PoolLogsReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_PoolLogs_Call) Return(_a0 error) *ProxyAppInterface_PoolLogs_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_PoolLogs_Call) Return(err error) *ProxyAppInterface_PoolLogs_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_PoolLogs_Call) RunAndReturn(run func(proxyrpc.PoolLogsParam, *proxyrpc.PoolLogsReply) error) *ProxyAppInterface_PoolLogs_Call {
+func (_c *ProxyAppInterface_PoolLogs_Call) RunAndReturn(run func(in proxyrpc.PoolLogsParam, out *proxyrpc.PoolLogsReply) error) *ProxyAppInterface_PoolLogs_Call {
_c.Call.Return(run)
return _c
}
-// RunReadProgress provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) RunReadProgress(in proxyrpc.RunReadProgressParams, out *proxyrpc.RunReadProgressReply) error {
- ret := _m.Called(in, out)
+// RunReadProgress provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) RunReadProgress(in proxyrpc.RunReadProgressParams, out *proxyrpc.RunReadProgressReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for RunReadProgress")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.RunReadProgressParams, *proxyrpc.RunReadProgressReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.RunReadProgressParams, *proxyrpc.RunReadProgressReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -381,36 +466,46 @@ func (_e *ProxyAppInterface_Expecter) RunReadProgress(in interface{}, out interf
func (_c *ProxyAppInterface_RunReadProgress_Call) Run(run func(in proxyrpc.RunReadProgressParams, out *proxyrpc.RunReadProgressReply)) *ProxyAppInterface_RunReadProgress_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.RunReadProgressParams), args[1].(*proxyrpc.RunReadProgressReply))
+ var arg0 proxyrpc.RunReadProgressParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.RunReadProgressParams)
+ }
+ var arg1 *proxyrpc.RunReadProgressReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.RunReadProgressReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_RunReadProgress_Call) Return(_a0 error) *ProxyAppInterface_RunReadProgress_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_RunReadProgress_Call) Return(err error) *ProxyAppInterface_RunReadProgress_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_RunReadProgress_Call) RunAndReturn(run func(proxyrpc.RunReadProgressParams, *proxyrpc.RunReadProgressReply) error) *ProxyAppInterface_RunReadProgress_Call {
+func (_c *ProxyAppInterface_RunReadProgress_Call) RunAndReturn(run func(in proxyrpc.RunReadProgressParams, out *proxyrpc.RunReadProgressReply) error) *ProxyAppInterface_RunReadProgress_Call {
_c.Call.Return(run)
return _c
}
-// RunStart provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) RunStart(in proxyrpc.RunStartParams, out *proxyrpc.RunStartReply) error {
- ret := _m.Called(in, out)
+// RunStart provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) RunStart(in proxyrpc.RunStartParams, out *proxyrpc.RunStartReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for RunStart")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.RunStartParams, *proxyrpc.RunStartReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.RunStartParams, *proxyrpc.RunStartReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -428,36 +523,46 @@ func (_e *ProxyAppInterface_Expecter) RunStart(in interface{}, out interface{})
func (_c *ProxyAppInterface_RunStart_Call) Run(run func(in proxyrpc.RunStartParams, out *proxyrpc.RunStartReply)) *ProxyAppInterface_RunStart_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.RunStartParams), args[1].(*proxyrpc.RunStartReply))
+ var arg0 proxyrpc.RunStartParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.RunStartParams)
+ }
+ var arg1 *proxyrpc.RunStartReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.RunStartReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_RunStart_Call) Return(_a0 error) *ProxyAppInterface_RunStart_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_RunStart_Call) Return(err error) *ProxyAppInterface_RunStart_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_RunStart_Call) RunAndReturn(run func(proxyrpc.RunStartParams, *proxyrpc.RunStartReply) error) *ProxyAppInterface_RunStart_Call {
+func (_c *ProxyAppInterface_RunStart_Call) RunAndReturn(run func(in proxyrpc.RunStartParams, out *proxyrpc.RunStartReply) error) *ProxyAppInterface_RunStart_Call {
_c.Call.Return(run)
return _c
}
-// RunStop provides a mock function with given fields: in, out
-func (_m *ProxyAppInterface) RunStop(in proxyrpc.RunStopParams, out *proxyrpc.RunStopReply) error {
- ret := _m.Called(in, out)
+// RunStop provides a mock function for the type ProxyAppInterface
+func (_mock *ProxyAppInterface) RunStop(in proxyrpc.RunStopParams, out *proxyrpc.RunStopReply) error {
+ ret := _mock.Called(in, out)
if len(ret) == 0 {
panic("no return value specified for RunStop")
}
var r0 error
- if rf, ok := ret.Get(0).(func(proxyrpc.RunStopParams, *proxyrpc.RunStopReply) error); ok {
- r0 = rf(in, out)
+ if returnFunc, ok := ret.Get(0).(func(proxyrpc.RunStopParams, *proxyrpc.RunStopReply) error); ok {
+ r0 = returnFunc(in, out)
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -475,31 +580,28 @@ func (_e *ProxyAppInterface_Expecter) RunStop(in interface{}, out interface{}) *
func (_c *ProxyAppInterface_RunStop_Call) Run(run func(in proxyrpc.RunStopParams, out *proxyrpc.RunStopReply)) *ProxyAppInterface_RunStop_Call {
_c.Call.Run(func(args mock.Arguments) {
- run(args[0].(proxyrpc.RunStopParams), args[1].(*proxyrpc.RunStopReply))
+ var arg0 proxyrpc.RunStopParams
+ if args[0] != nil {
+ arg0 = args[0].(proxyrpc.RunStopParams)
+ }
+ var arg1 *proxyrpc.RunStopReply
+ if args[1] != nil {
+ arg1 = args[1].(*proxyrpc.RunStopReply)
+ }
+ run(
+ arg0,
+ arg1,
+ )
})
return _c
}
-func (_c *ProxyAppInterface_RunStop_Call) Return(_a0 error) *ProxyAppInterface_RunStop_Call {
- _c.Call.Return(_a0)
+func (_c *ProxyAppInterface_RunStop_Call) Return(err error) *ProxyAppInterface_RunStop_Call {
+ _c.Call.Return(err)
return _c
}
-func (_c *ProxyAppInterface_RunStop_Call) RunAndReturn(run func(proxyrpc.RunStopParams, *proxyrpc.RunStopReply) error) *ProxyAppInterface_RunStop_Call {
+func (_c *ProxyAppInterface_RunStop_Call) RunAndReturn(run func(in proxyrpc.RunStopParams, out *proxyrpc.RunStopReply) error) *ProxyAppInterface_RunStop_Call {
_c.Call.Return(run)
return _c
}
-
-// NewProxyAppInterface creates a new instance of ProxyAppInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewProxyAppInterface(t interface {
- mock.TestingT
- Cleanup(func())
-}) *ProxyAppInterface {
- mock := &ProxyAppInterface{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}
diff --git a/vm/proxyapp/mocks/subProcessCmd.go b/vm/proxyapp/mocks/subProcessCmd.go
index 50961fe0d..aea349fa9 100644
--- a/vm/proxyapp/mocks/subProcessCmd.go
+++ b/vm/proxyapp/mocks/subProcessCmd.go
@@ -1,13 +1,29 @@
-// Code generated by mockery v2.52.1. DO NOT EDIT.
+// Code generated by mockery; DO NOT EDIT.
+// github.com/vektra/mockery
+// template: testify
package mocks
import (
- io "io"
+ "io"
mock "github.com/stretchr/testify/mock"
)
+// NewSubProcessCmd creates a new instance of SubProcessCmd. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
+// The first argument is typically a *testing.T value.
+func NewSubProcessCmd(t interface {
+ mock.TestingT
+ Cleanup(func())
+}) *SubProcessCmd {
+ mock := &SubProcessCmd{}
+ mock.Mock.Test(t)
+
+ t.Cleanup(func() { mock.AssertExpectations(t) })
+
+ return mock
+}
+
// SubProcessCmd is an autogenerated mock type for the subProcessCmd type
type SubProcessCmd struct {
mock.Mock
@@ -21,21 +37,20 @@ func (_m *SubProcessCmd) EXPECT() *SubProcessCmd_Expecter {
return &SubProcessCmd_Expecter{mock: &_m.Mock}
}
-// Start provides a mock function with no fields
-func (_m *SubProcessCmd) Start() error {
- ret := _m.Called()
+// Start provides a mock function for the type SubProcessCmd
+func (_mock *SubProcessCmd) Start() error {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Start")
}
var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() error); ok {
+ r0 = returnFunc()
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -56,8 +71,8 @@ func (_c *SubProcessCmd_Start_Call) Run(run func()) *SubProcessCmd_Start_Call {
return _c
}
-func (_c *SubProcessCmd_Start_Call) Return(_a0 error) *SubProcessCmd_Start_Call {
- _c.Call.Return(_a0)
+func (_c *SubProcessCmd_Start_Call) Return(err error) *SubProcessCmd_Start_Call {
+ _c.Call.Return(err)
return _c
}
@@ -66,9 +81,9 @@ func (_c *SubProcessCmd_Start_Call) RunAndReturn(run func() error) *SubProcessCm
return _c
}
-// StderrPipe provides a mock function with no fields
-func (_m *SubProcessCmd) StderrPipe() (io.ReadCloser, error) {
- ret := _m.Called()
+// StderrPipe provides a mock function for the type SubProcessCmd
+func (_mock *SubProcessCmd) StderrPipe() (io.ReadCloser, error) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for StderrPipe")
@@ -76,23 +91,21 @@ func (_m *SubProcessCmd) StderrPipe() (io.ReadCloser, error) {
var r0 io.ReadCloser
var r1 error
- if rf, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() io.ReadCloser); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() io.ReadCloser); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
-
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() error); ok {
+ r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -113,8 +126,8 @@ func (_c *SubProcessCmd_StderrPipe_Call) Run(run func()) *SubProcessCmd_StderrPi
return _c
}
-func (_c *SubProcessCmd_StderrPipe_Call) Return(_a0 io.ReadCloser, _a1 error) *SubProcessCmd_StderrPipe_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *SubProcessCmd_StderrPipe_Call) Return(readCloser io.ReadCloser, err error) *SubProcessCmd_StderrPipe_Call {
+ _c.Call.Return(readCloser, err)
return _c
}
@@ -123,9 +136,9 @@ func (_c *SubProcessCmd_StderrPipe_Call) RunAndReturn(run func() (io.ReadCloser,
return _c
}
-// StdinPipe provides a mock function with no fields
-func (_m *SubProcessCmd) StdinPipe() (io.WriteCloser, error) {
- ret := _m.Called()
+// StdinPipe provides a mock function for the type SubProcessCmd
+func (_mock *SubProcessCmd) StdinPipe() (io.WriteCloser, error) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for StdinPipe")
@@ -133,23 +146,21 @@ func (_m *SubProcessCmd) StdinPipe() (io.WriteCloser, error) {
var r0 io.WriteCloser
var r1 error
- if rf, ok := ret.Get(0).(func() (io.WriteCloser, error)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() (io.WriteCloser, error)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() io.WriteCloser); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() io.WriteCloser); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.WriteCloser)
}
}
-
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() error); ok {
+ r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -170,8 +181,8 @@ func (_c *SubProcessCmd_StdinPipe_Call) Run(run func()) *SubProcessCmd_StdinPipe
return _c
}
-func (_c *SubProcessCmd_StdinPipe_Call) Return(_a0 io.WriteCloser, _a1 error) *SubProcessCmd_StdinPipe_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *SubProcessCmd_StdinPipe_Call) Return(writeCloser io.WriteCloser, err error) *SubProcessCmd_StdinPipe_Call {
+ _c.Call.Return(writeCloser, err)
return _c
}
@@ -180,9 +191,9 @@ func (_c *SubProcessCmd_StdinPipe_Call) RunAndReturn(run func() (io.WriteCloser,
return _c
}
-// StdoutPipe provides a mock function with no fields
-func (_m *SubProcessCmd) StdoutPipe() (io.ReadCloser, error) {
- ret := _m.Called()
+// StdoutPipe provides a mock function for the type SubProcessCmd
+func (_mock *SubProcessCmd) StdoutPipe() (io.ReadCloser, error) {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for StdoutPipe")
@@ -190,23 +201,21 @@ func (_m *SubProcessCmd) StdoutPipe() (io.ReadCloser, error) {
var r0 io.ReadCloser
var r1 error
- if rf, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok {
- return rf()
+ if returnFunc, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok {
+ return returnFunc()
}
- if rf, ok := ret.Get(0).(func() io.ReadCloser); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() io.ReadCloser); ok {
+ r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(io.ReadCloser)
}
}
-
- if rf, ok := ret.Get(1).(func() error); ok {
- r1 = rf()
+ if returnFunc, ok := ret.Get(1).(func() error); ok {
+ r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
-
return r0, r1
}
@@ -227,8 +236,8 @@ func (_c *SubProcessCmd_StdoutPipe_Call) Run(run func()) *SubProcessCmd_StdoutPi
return _c
}
-func (_c *SubProcessCmd_StdoutPipe_Call) Return(_a0 io.ReadCloser, _a1 error) *SubProcessCmd_StdoutPipe_Call {
- _c.Call.Return(_a0, _a1)
+func (_c *SubProcessCmd_StdoutPipe_Call) Return(readCloser io.ReadCloser, err error) *SubProcessCmd_StdoutPipe_Call {
+ _c.Call.Return(readCloser, err)
return _c
}
@@ -237,21 +246,20 @@ func (_c *SubProcessCmd_StdoutPipe_Call) RunAndReturn(run func() (io.ReadCloser,
return _c
}
-// Wait provides a mock function with no fields
-func (_m *SubProcessCmd) Wait() error {
- ret := _m.Called()
+// Wait provides a mock function for the type SubProcessCmd
+func (_mock *SubProcessCmd) Wait() error {
+ ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Wait")
}
var r0 error
- if rf, ok := ret.Get(0).(func() error); ok {
- r0 = rf()
+ if returnFunc, ok := ret.Get(0).(func() error); ok {
+ r0 = returnFunc()
} else {
r0 = ret.Error(0)
}
-
return r0
}
@@ -272,8 +280,8 @@ func (_c *SubProcessCmd_Wait_Call) Run(run func()) *SubProcessCmd_Wait_Call {
return _c
}
-func (_c *SubProcessCmd_Wait_Call) Return(_a0 error) *SubProcessCmd_Wait_Call {
- _c.Call.Return(_a0)
+func (_c *SubProcessCmd_Wait_Call) Return(err error) *SubProcessCmd_Wait_Call {
+ _c.Call.Return(err)
return _c
}
@@ -281,17 +289,3 @@ func (_c *SubProcessCmd_Wait_Call) RunAndReturn(run func() error) *SubProcessCmd
_c.Call.Return(run)
return _c
}
-
-// NewSubProcessCmd creates a new instance of SubProcessCmd. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
-// The first argument is typically a *testing.T value.
-func NewSubProcessCmd(t interface {
- mock.TestingT
- Cleanup(func())
-}) *SubProcessCmd {
- mock := &SubProcessCmd{}
- mock.Mock.Test(t)
-
- t.Cleanup(func() { mock.AssertExpectations(t) })
-
- return mock
-}