rpc: tests cleanup, use client lib for JSONRPC testing too

This commit is contained in:
Ethan Buchman
2015-04-02 18:11:37 -07:00
parent 474bf31400
commit 3bedcbf94d
5 changed files with 98 additions and 240 deletions

View File

@ -0,0 +1,59 @@
package rpc
import (
"testing"
)
//--------------------------------------------------------------------------------
// Test the HTTP client
func TestHTTPStatus(t *testing.T) {
testStatus(t, "HTTP")
}
func TestHTTPGenPriv(t *testing.T) {
testGenPriv(t, "HTTP")
}
func TestHTTPGetAccount(t *testing.T) {
testGetAccount(t, "HTTP")
}
func TestHTTPSignedTx(t *testing.T) {
testSignedTx(t, "HTTP")
}
func TestHTTPBroadcastTx(t *testing.T) {
testBroadcastTx(t, "HTTP")
}
func TestHTTPGetStorage(t *testing.T) {
testGetStorage(t, "HTTP")
}
//--------------------------------------------------------------------------------
// Test the JSONRPC client
func TestJSONStatus(t *testing.T) {
testStatus(t, "JSONRPC")
}
func TestJSONGenPriv(t *testing.T) {
testGenPriv(t, "JSONRPC")
}
func TestJSONGetAccount(t *testing.T) {
testGetAccount(t, "JSONRPC")
}
func TestJSONSignedTx(t *testing.T) {
testSignedTx(t, "JSONRPC")
}
func TestJSONBroadcastTx(t *testing.T) {
testBroadcastTx(t, "JSONRPC")
}
func TestJSONGetStorage(t *testing.T) {
testGetStorage(t, "JSONRPC")
}