From 26be8df8135ecb59e8034967927aa18c26117a3a Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 22 Feb 2023 16:09:15 +0100 Subject: all: tools/syz-env make generate result --- vm/proxyapp/mocks/ProxyAppInterface.go | 6 +++--- vm/proxyapp/mocks/subProcessCmd.go | 21 +++++++++++++++------ vm/proxyapp/proxyappclient_test.go | 8 +++++--- 3 files changed, 23 insertions(+), 12 deletions(-) (limited to 'vm/proxyapp') diff --git a/vm/proxyapp/mocks/ProxyAppInterface.go b/vm/proxyapp/mocks/ProxyAppInterface.go index 95a86a8da..81ac864d6 100644 --- a/vm/proxyapp/mocks/ProxyAppInterface.go +++ b/vm/proxyapp/mocks/ProxyAppInterface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.20.2. DO NOT EDIT. package mocks @@ -152,13 +152,13 @@ func (_m *ProxyAppInterface) RunStop(in proxyrpc.RunStopParams, out *proxyrpc.Ru return r0 } -type NewProxyAppInterfaceT interface { +type mockConstructorTestingTNewProxyAppInterface interface { mock.TestingT Cleanup(func()) } // 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. -func NewProxyAppInterface(t NewProxyAppInterfaceT) *ProxyAppInterface { +func NewProxyAppInterface(t mockConstructorTestingTNewProxyAppInterface) *ProxyAppInterface { mock := &ProxyAppInterface{} mock.Mock.Test(t) diff --git a/vm/proxyapp/mocks/subProcessCmd.go b/vm/proxyapp/mocks/subProcessCmd.go index e39e02329..94f37256f 100644 --- a/vm/proxyapp/mocks/subProcessCmd.go +++ b/vm/proxyapp/mocks/subProcessCmd.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.12.3. DO NOT EDIT. +// Code generated by mockery v2.20.2. DO NOT EDIT. package mocks @@ -32,6 +32,10 @@ func (_m *SubProcessCmd) StderrPipe() (io.ReadCloser, error) { ret := _m.Called() var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() io.ReadCloser); ok { r0 = rf() } else { @@ -40,7 +44,6 @@ func (_m *SubProcessCmd) StderrPipe() (io.ReadCloser, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -55,6 +58,10 @@ func (_m *SubProcessCmd) StdinPipe() (io.WriteCloser, error) { ret := _m.Called() var r0 io.WriteCloser + var r1 error + if rf, ok := ret.Get(0).(func() (io.WriteCloser, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() io.WriteCloser); ok { r0 = rf() } else { @@ -63,7 +70,6 @@ func (_m *SubProcessCmd) StdinPipe() (io.WriteCloser, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -78,6 +84,10 @@ func (_m *SubProcessCmd) StdoutPipe() (io.ReadCloser, error) { ret := _m.Called() var r0 io.ReadCloser + var r1 error + if rf, ok := ret.Get(0).(func() (io.ReadCloser, error)); ok { + return rf() + } if rf, ok := ret.Get(0).(func() io.ReadCloser); ok { r0 = rf() } else { @@ -86,7 +96,6 @@ func (_m *SubProcessCmd) StdoutPipe() (io.ReadCloser, error) { } } - var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -110,13 +119,13 @@ func (_m *SubProcessCmd) Wait() error { return r0 } -type NewSubProcessCmdT interface { +type mockConstructorTestingTNewSubProcessCmd interface { mock.TestingT Cleanup(func()) } // 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. -func NewSubProcessCmd(t NewSubProcessCmdT) *SubProcessCmd { +func NewSubProcessCmd(t mockConstructorTestingTNewSubProcessCmd) *SubProcessCmd { mock := &SubProcessCmd{} mock.Mock.Test(t) diff --git a/vm/proxyapp/proxyappclient_test.go b/vm/proxyapp/proxyappclient_test.go index 458e3f43e..0f199c0c8 100644 --- a/vm/proxyapp/proxyappclient_test.go +++ b/vm/proxyapp/proxyappclient_test.go @@ -137,8 +137,9 @@ func TestCtor_FailedStartProxyApp(t *testing.T) { } // TODO: reuse proxyAppServerFixture() code: func could be called here once Mock.Unset() error -// fixed https://github.com/stretchr/testify/issues/1236 -// nolint: dupl +// +// fixed https://github.com/stretchr/testify/issues/1236 +// nolint: dupl func TestCtor_FailedConstructPool(t *testing.T) { mProxyAppServer, stdin, stdout, stderr := makeMockProxyAppProcess(t) @@ -197,7 +198,8 @@ func initProxyAppServerFixture(mProxyAppServer *mockProxyAppInterface) *mockProx } // TODO: to remove duplicate see TestCtor_FailedConstructPool() comment -// nolint: dupl +// +// nolint: dupl func proxyAppServerFixture(t *testing.T) (*mockProxyAppInterface, *mockCommandRunner, *proxyAppParams) { mProxyAppServer, stdin, stdout, stderr := makeMockProxyAppProcess(t) -- cgit mrf-deployment