tendermint/rpc/test/client_rpc_test.go

130 lines
2.6 KiB
Go
Raw Normal View History

package rpctest
import (
_ "github.com/tendermint/tendermint/config/tendermint_test"
"testing"
)
2015-07-09 18:10:46 +00:00
// When run with `-test.short` we only run:
// TestHTTPStatus, TestHTTPBroadcast, TestJSONStatus, TestJSONBroadcast, TestWSConnect, TestWSSend
//--------------------------------------------------------------------------------
// Test the HTTP client
func TestHTTPStatus(t *testing.T) {
testStatus(t, "HTTP")
}
func TestHTTPGenPriv(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGenPriv(t, "HTTP")
}
func TestHTTPGetAccount(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGetAccount(t, "HTTP")
}
func TestHTTPSignedTx(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testSignedTx(t, "HTTP")
}
func TestHTTPBroadcastTx(t *testing.T) {
testBroadcastTx(t, "HTTP")
}
func TestHTTPGetStorage(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGetStorage(t, "HTTP")
}
2015-04-02 19:15:23 -07:00
func TestHTTPCallCode(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-04-02 19:15:23 -07:00
testCallCode(t, "HTTP")
}
func TestHTTPCallContract(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-04-02 19:15:23 -07:00
testCall(t, "HTTP")
}
2015-05-22 17:03:22 -04:00
func TestHTTPNameReg(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-05-22 17:03:22 -04:00
testNameReg(t, "HTTP")
}
//--------------------------------------------------------------------------------
// Test the JSONRPC client
func TestJSONStatus(t *testing.T) {
testStatus(t, "JSONRPC")
}
func TestJSONGenPriv(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGenPriv(t, "JSONRPC")
}
func TestJSONGetAccount(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGetAccount(t, "JSONRPC")
}
func TestJSONSignedTx(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testSignedTx(t, "JSONRPC")
}
func TestJSONBroadcastTx(t *testing.T) {
testBroadcastTx(t, "JSONRPC")
}
func TestJSONGetStorage(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
testGetStorage(t, "JSONRPC")
}
2015-04-02 19:15:23 -07:00
func TestJSONCallCode(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-04-02 19:15:23 -07:00
testCallCode(t, "JSONRPC")
}
func TestJSONCallContract(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-04-02 19:15:23 -07:00
testCall(t, "JSONRPC")
}
2015-05-22 17:03:22 -04:00
func TestJSONNameReg(t *testing.T) {
2015-07-09 18:10:46 +00:00
if testing.Short() {
t.Skip("skipping test in short mode.")
}
2015-05-22 17:03:22 -04:00
testNameReg(t, "JSONRPC")
}