|
|
@ -5,6 +5,9 @@ import ( |
|
|
|
"testing" |
|
|
|
) |
|
|
|
|
|
|
|
// When run with `-test.short` we only run:
|
|
|
|
// TestHTTPStatus, TestHTTPBroadcast, TestJSONStatus, TestJSONBroadcast, TestWSConnect, TestWSSend
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
// Test the HTTP client
|
|
|
|
|
|
|
@ -13,14 +16,23 @@ func TestHTTPStatus(t *testing.T) { |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPGenPriv(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGenPriv(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPGetAccount(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGetAccount(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPSignedTx(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testSignedTx(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
@ -29,18 +41,30 @@ func TestHTTPBroadcastTx(t *testing.T) { |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPGetStorage(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGetStorage(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPCallCode(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testCallCode(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPCallContract(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testCall(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
|
func TestHTTPNameReg(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testNameReg(t, "HTTP") |
|
|
|
} |
|
|
|
|
|
|
@ -52,14 +76,23 @@ func TestJSONStatus(t *testing.T) { |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONGenPriv(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGenPriv(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONGetAccount(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGetAccount(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONSignedTx(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testSignedTx(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
@ -68,17 +101,29 @@ func TestJSONBroadcastTx(t *testing.T) { |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONGetStorage(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testGetStorage(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONCallCode(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testCallCode(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONCallContract(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testCall(t, "JSONRPC") |
|
|
|
} |
|
|
|
|
|
|
|
func TestJSONNameReg(t *testing.T) { |
|
|
|
if testing.Short() { |
|
|
|
t.Skip("skipping test in short mode.") |
|
|
|
} |
|
|
|
testNameReg(t, "JSONRPC") |
|
|
|
} |