diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-07-01 19:09:33 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-07-01 21:41:27 +0000 |
| commit | bc80e4f080d226b12fae367dc46bc54ac3681009 (patch) | |
| tree | 396991c29ca9a28b701a72013e5283ef0188b8ec /pkg/coveragedb/mocks/ReadOnlyTransaction.go | |
| parent | 065d1b73397a6839320b1fc6cb5b40e8623a4825 (diff) | |
all/mocks: regenerate with mockery v3
Diffstat (limited to 'pkg/coveragedb/mocks/ReadOnlyTransaction.go')
| -rw-r--r-- | pkg/coveragedb/mocks/ReadOnlyTransaction.go | 69 |
1 files changed, 40 insertions, 29 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 -} |
