aboutsummaryrefslogtreecommitdiffstats
path: root/vm/proxyapp/proxyappclient_mocks_test.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-23 17:20:16 +0100
committerTaras Madan <tarasmadan@google.com>2023-02-24 12:47:23 +0100
commit5e3180302022fcbbe14cc59fbd2c2aeb1682f3df (patch)
tree928510c3a9ea3f1ee3cf1b0b93e756a850ff51b3 /vm/proxyapp/proxyappclient_mocks_test.go
parentc725ad8a10e6894bcd5b633c290f5da89f7fab1b (diff)
vm/proxyapp/proxyappclient_mocks_test.go: copy mock interface to fix the error
After the mockery version up I just didn't find better solution. If you see better approach - please share your idea.
Diffstat (limited to 'vm/proxyapp/proxyappclient_mocks_test.go')
-rw-r--r--vm/proxyapp/proxyappclient_mocks_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/vm/proxyapp/proxyappclient_mocks_test.go b/vm/proxyapp/proxyappclient_mocks_test.go
index e40e898b2..49166a767 100644
--- a/vm/proxyapp/proxyappclient_mocks_test.go
+++ b/vm/proxyapp/proxyappclient_mocks_test.go
@@ -12,6 +12,7 @@ import (
"github.com/google/syzkaller/vm/proxyapp/mocks"
"github.com/google/syzkaller/vm/proxyapp/proxyrpc"
+ "github.com/stretchr/testify/mock"
)
var (
@@ -49,7 +50,12 @@ type mockProxyAppInterface struct {
OnLogsReceived chan bool
}
-func makeMockProxyAppInterface(t mocks.NewProxyAppInterfaceT) *mockProxyAppInterface {
+type tNewProxyAppInterface interface {
+ mock.TestingT
+ Cleanup(func())
+}
+
+func makeMockProxyAppInterface(t tNewProxyAppInterface) *mockProxyAppInterface {
return &mockProxyAppInterface{
ProxyAppInterface: mocks.NewProxyAppInterface(t),
OnLogsReceived: make(chan bool, 1), // 1 is enough as we read it just once