rpc: add compat tests for RPC* interfaces and Client implementations
This commit is contained in:
parent
00d44235c1
commit
6b216050f3
2 changed files with 35 additions and 0 deletions
19
pkg/rpcclient/actor/compat_test.go
Normal file
19
pkg/rpcclient/actor/compat_test.go
Normal 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{})
|
||||
}
|
16
pkg/rpcclient/invoker/compat_test.go
Normal file
16
pkg/rpcclient/invoker/compat_test.go
Normal 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{})
|
||||
}
|
Loading…
Reference in a new issue