From 6b216050f37741ae9813440f8047a6df5b592bcc Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 21 Oct 2022 10:17:23 +0300 Subject: [PATCH] rpc: add compat tests for RPC* interfaces and Client implementations --- pkg/rpcclient/actor/compat_test.go | 19 +++++++++++++++++++ pkg/rpcclient/invoker/compat_test.go | 16 ++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pkg/rpcclient/actor/compat_test.go create mode 100644 pkg/rpcclient/invoker/compat_test.go diff --git a/pkg/rpcclient/actor/compat_test.go b/pkg/rpcclient/actor/compat_test.go new file mode 100644 index 000000000..b8e356898 --- /dev/null +++ b/pkg/rpcclient/actor/compat_test.go @@ -0,0 +1,19 @@ +package actor_test + +import ( + "testing" + + "github.com/nspcc-dev/neo-go/pkg/rpcclient" + "github.com/nspcc-dev/neo-go/pkg/rpcclient/actor" +) + +func TestRPCActorRPCClientCompat(t *testing.T) { + _ = actor.RPCActor(&rpcclient.WSClient{}) + _ = actor.RPCActor(&rpcclient.Client{}) +} + +func TestRPCWaiterRPCClientCompat(t *testing.T) { + _ = actor.RPCPollingWaiter(&rpcclient.Client{}) + _ = actor.RPCPollingWaiter(&rpcclient.WSClient{}) + _ = actor.RPCEventWaiter(&rpcclient.WSClient{}) +} diff --git a/pkg/rpcclient/invoker/compat_test.go b/pkg/rpcclient/invoker/compat_test.go new file mode 100644 index 000000000..1c875da6d --- /dev/null +++ b/pkg/rpcclient/invoker/compat_test.go @@ -0,0 +1,16 @@ +package invoker_test + +import ( + "testing" + + "github.com/nspcc-dev/neo-go/pkg/rpcclient" + "github.com/nspcc-dev/neo-go/pkg/rpcclient/invoker" +) + +func TestRPCInvokerRPCClientCompat(t *testing.T) { + _ = invoker.RPCInvoke(&rpcclient.Client{}) + _ = invoker.RPCInvoke(&rpcclient.WSClient{}) + _ = invoker.RPCInvokeHistoric(&rpcclient.Client{}) + _ = invoker.RPCInvokeHistoric(&rpcclient.WSClient{}) + _ = invoker.RPCSessions(&rpcclient.WSClient{}) +}