Merged tests into one file to run with CI

This commit is contained in:
coffeepots 2018-04-10 18:41:12 +01:00
parent 1389fcac55
commit 9ebf3990fd
2 changed files with 5 additions and 13 deletions

View File

@ -1,11 +0,0 @@
import ../eth-rpc/rpcserver, asyncdispatch
when isMainModule:
echo "Initialising server..."
# create on localhost, default port
var srv = newRpcServer("")
echo "Server started."
asyncCheck srv.serve()
runForever()
echo "Server stopped."

View File

@ -1,6 +1,10 @@
import ../eth-rpc/rpcclient, asyncdispatch, json, unittest
import ../eth-rpc / rpcclient, ../eth-rpc / rpcserver, asyncdispatch, json, unittest
when isMainModule:
# create on localhost, default port
var srv = newRpcServer("")
asyncCheck srv.serve()
suite "RPC":
proc main {.async.} =
var client = newRpcClient()
@ -15,4 +19,3 @@ when isMainModule:
check response.result.getStr == "3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532"
waitFor main()
echo "Finished."