rpc: add compat tests for RPC* interfaces and Client implementations

This commit is contained in:
Anna Shaleva 2022-10-21 10:17:23 +03:00
parent 00d44235c1
commit 6b216050f3
2 changed files with 35 additions and 0 deletions

View file

@ -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{})
}

View file

@ -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{})
}