From 3adbb6d52eef4762f86269263bf25b3df172b643 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Tue, 4 Jun 2024 01:09:17 -0400 Subject: [PATCH] Revert "PR: Test out of date mocks" This reverts commit 4b20f8f992866b58839c2f23c4c2dc1ac3d7f5d7. --- datastore/mocks/results.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/datastore/mocks/results.go b/datastore/mocks/results.go index 6a6051a2cb..e1fee8f859 100644 --- a/datastore/mocks/results.go +++ b/datastore/mocks/results.go @@ -4,18 +4,18 @@ package mocks import ( goprocess "github.com/jbenet/goprocess" - mockCHANGED "github.com/stretchr/testify/mock" + mock "github.com/stretchr/testify/mock" query "github.com/ipfs/go-datastore/query" ) // Results is an autogenerated mock type for the Results type type Results struct { - mockCHANGED.Mock + mock.Mock } type Results_Expecter struct { - mock *mockCHANGED.Mock + mock *mock.Mock } func (_m *Results) EXPECT() *Results_Expecter { @@ -38,7 +38,7 @@ func (_m *Results) Close() error { // Results_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type Results_Close_Call struct { - *mockCHANGED.Call + *mock.Call } // Close is a helper method to define mock.On call @@ -47,7 +47,7 @@ func (_e *Results_Expecter) Close() *Results_Close_Call { } func (_c *Results_Close_Call) Run(run func()) *Results_Close_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -81,7 +81,7 @@ func (_m *Results) Next() <-chan query.Result { // Results_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next' type Results_Next_Call struct { - *mockCHANGED.Call + *mock.Call } // Next is a helper method to define mock.On call @@ -90,7 +90,7 @@ func (_e *Results_Expecter) Next() *Results_Next_Call { } func (_c *Results_Next_Call) Run(run func()) *Results_Next_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -132,7 +132,7 @@ func (_m *Results) NextSync() (query.Result, bool) { // Results_NextSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextSync' type Results_NextSync_Call struct { - *mockCHANGED.Call + *mock.Call } // NextSync is a helper method to define mock.On call @@ -141,7 +141,7 @@ func (_e *Results_Expecter) NextSync() *Results_NextSync_Call { } func (_c *Results_NextSync_Call) Run(run func()) *Results_NextSync_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -175,7 +175,7 @@ func (_m *Results) Process() goprocess.Process { // Results_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process' type Results_Process_Call struct { - *mockCHANGED.Call + *mock.Call } // Process is a helper method to define mock.On call @@ -184,7 +184,7 @@ func (_e *Results_Expecter) Process() *Results_Process_Call { } func (_c *Results_Process_Call) Run(run func()) *Results_Process_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -216,7 +216,7 @@ func (_m *Results) Query() query.Query { // Results_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' type Results_Query_Call struct { - *mockCHANGED.Call + *mock.Call } // Query is a helper method to define mock.On call @@ -225,7 +225,7 @@ func (_e *Results_Expecter) Query() *Results_Query_Call { } func (_c *Results_Query_Call) Run(run func()) *Results_Query_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -269,7 +269,7 @@ func (_m *Results) Rest() ([]query.Entry, error) { // Results_Rest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rest' type Results_Rest_Call struct { - *mockCHANGED.Call + *mock.Call } // Rest is a helper method to define mock.On call @@ -278,7 +278,7 @@ func (_e *Results_Expecter) Rest() *Results_Rest_Call { } func (_c *Results_Rest_Call) Run(run func()) *Results_Rest_Call { - _c.Call.Run(func(args mockCHANGED.Arguments) { + _c.Call.Run(func(args mock.Arguments) { run() }) return _c @@ -297,7 +297,7 @@ func (_c *Results_Rest_Call) RunAndReturn(run func() ([]query.Entry, error)) *Re // NewResults creates a new instance of Results. 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 NewResults(t interface { - mockCHANGED.TestingT + mock.TestingT Cleanup(func()) }) *Results { mock := &Results{}