diff options
author | Dimitry <winsvega@mail.ru> | 2017-03-15 06:49:00 +0800 |
---|---|---|
committer | Dimitry <winsvega@mail.ru> | 2017-03-15 06:49:00 +0800 |
commit | fb73c4dc0b1ef9e2efd158004f5dab6a63b8b72f (patch) | |
tree | eec7907daaa6b60ec387eaf0e5b39f41052f1870 /RPCTests | |
parent | ea91b7b4b88f9256ef52b0ae615329f1b9d072d6 (diff) | |
download | dexon-tests-fb73c4dc0b1ef9e2efd158004f5dab6a63b8b72f.tar.gz dexon-tests-fb73c4dc0b1ef9e2efd158004f5dab6a63b8b72f.tar.zst dexon-tests-fb73c4dc0b1ef9e2efd158004f5dab6a63b8b72f.zip |
add stderror to RPC tests
Diffstat (limited to 'RPCTests')
6 files changed, 32 insertions, 6 deletions
diff --git a/RPCTests/scripts/tests/AddPeer/step00_node02_AddPeer.js b/RPCTests/scripts/tests/AddPeer/step00_node02_AddPeer.js index 233648dc3..a7ffb25e6 100644 --- a/RPCTests/scripts/tests/AddPeer/step00_node02_AddPeer.js +++ b/RPCTests/scripts/tests/AddPeer/step00_node02_AddPeer.js @@ -1,4 +1,6 @@ -process.stdout.write("TEST_addPeerOnNode2 "); +var testname = "TEST_addPeerOnNode2 "; +process.stdout.write(testname); + var onResult = {}; web3.admin.addPeer("enode://" + args["node1_ID"] + "@127.0.0.1:" + args["node1_port"], function(err, res){ onResult(err, res); }) @@ -20,7 +22,10 @@ onGetPeerCount = function (err, res) if (res == 1) console.log("OK"); else + { console.log("FAILED"); + console.error(testname + "FAILED"); + } callback(err, res); } diff --git a/RPCTests/scripts/tests/AddPeer/step01_node01_getPeerCount.js.js b/RPCTests/scripts/tests/AddPeer/step01_node01_getPeerCount.js.js index 1f53480ff..c6cefa718 100644 --- a/RPCTests/scripts/tests/AddPeer/step01_node01_getPeerCount.js.js +++ b/RPCTests/scripts/tests/AddPeer/step01_node01_getPeerCount.js.js @@ -1,4 +1,6 @@ -process.stdout.write("TEST_getPeerCountOnNode1 "); +var testname = "TEST_getPeerCountOnNode1 "; +process.stdout.write(testname); + var onResult = {}; web3.net.getPeerCount(function(err, res){ onResult(err, res); }) onResult = function (err,res) @@ -6,7 +8,10 @@ onResult = function (err,res) if (res == 1) console.log("OK"); else + { console.log("FAILED"); + console.error(testname + "FAILED"); + } callback(err, res); } diff --git a/RPCTests/scripts/tests/MineBlocks/step00_node01_mineBlocks.js b/RPCTests/scripts/tests/MineBlocks/step00_node01_mineBlocks.js index 4abcdbd40..efed4b538 100644 --- a/RPCTests/scripts/tests/MineBlocks/step00_node01_mineBlocks.js +++ b/RPCTests/scripts/tests/MineBlocks/step00_node01_mineBlocks.js @@ -1,4 +1,5 @@ -process.stdout.write("TEST_mineBlockOnNode1 "); +var testname = "TEST_mineBlockOnNode1 "; +process.stdout.write(testname); var latestBlock; web3.eth.getBlockNumber(function(err, res){ onGetBlockNumber1(err, res); }) @@ -26,7 +27,10 @@ onGetBlockNumber = function (err, res) if (res == latestBlock + 1) console.log("OK"); else + { console.log("FAILED"); + console.error(testname + "FAILED"); + } callback(err, res); } diff --git a/RPCTests/scripts/tests/MineBlocks/step01_node02_getBlockHash.js b/RPCTests/scripts/tests/MineBlocks/step01_node02_getBlockHash.js index 92be98acf..670d0649b 100644 --- a/RPCTests/scripts/tests/MineBlocks/step01_node02_getBlockHash.js +++ b/RPCTests/scripts/tests/MineBlocks/step01_node02_getBlockHash.js @@ -1,4 +1,5 @@ -process.stdout.write("TEST_getBlockHashOnNode2 "); +var testname = "TEST_getBlockHashOnNode2 "; +process.stdout.write(testname); var onResult = {}; web3.eth.getBlock("latest", function(err, res){ onResult(err, res); }) @@ -8,7 +9,10 @@ onResult = function (err,res) if (res.hash == args["node1_lastblock"].hash) console.log("OK"); else + { console.log("FAILED"); + console.error(testname + "FAILED"); + } callback(err, res); } diff --git a/RPCTests/scripts/tests/MineBlocks2/step00_node02_mineBlocks.js b/RPCTests/scripts/tests/MineBlocks2/step00_node02_mineBlocks.js index 70936cc41..e29757bf5 100644 --- a/RPCTests/scripts/tests/MineBlocks2/step00_node02_mineBlocks.js +++ b/RPCTests/scripts/tests/MineBlocks2/step00_node02_mineBlocks.js @@ -1,4 +1,5 @@ -process.stdout.write("TEST_mineBlockOnNode2 "); +var testname = "TEST_mineBlockOnNode2 "; +process.stdout.write(testname); var latestBlock; web3.eth.getBlockNumber(function(err, res){ onGetBlockNumber1(err, res); }) @@ -26,6 +27,9 @@ onGetBlockNumber = function (err, res) if (res == latestBlock + 1) console.log("OK"); else + { console.log("FAILED"); + console.error(testname + "FAILED"); + } callback(err, res); } diff --git a/RPCTests/scripts/tests/MineBlocks2/step01_node01_getBlockHash.js b/RPCTests/scripts/tests/MineBlocks2/step01_node01_getBlockHash.js index d3a3b0bbf..edc94bc1c 100644 --- a/RPCTests/scripts/tests/MineBlocks2/step01_node01_getBlockHash.js +++ b/RPCTests/scripts/tests/MineBlocks2/step01_node01_getBlockHash.js @@ -1,4 +1,5 @@ -process.stdout.write("TEST_getBlockHashOnNode1 "); +var testname = "TEST_getBlockHashOnNode1 "; +process.stdout.write(testname); var onResult = {}; web3.eth.getBlock("latest", function(err, res){ onResult(err, res); }) @@ -8,6 +9,9 @@ onResult = function (err,res) if (res.hash == args["node2_lastblock"].hash) console.log("OK"); else + { console.log("FAILED "); + console.error(testname + "FAILED"); + } callback(err, res); } |