mirror of
https://github.com/codex-storage/nim-json-rpc.git
synced 2025-02-22 16:08:29 +00:00
Merged tests into one file to run with CI
This commit is contained in:
parent
1389fcac55
commit
9ebf3990fd
@ -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."
|
|
@ -1,6 +1,10 @@
|
|||||||
import ../eth-rpc/rpcclient, asyncdispatch, json, unittest
|
import ../eth-rpc / rpcclient, ../eth-rpc / rpcserver, asyncdispatch, json, unittest
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
|
# create on localhost, default port
|
||||||
|
var srv = newRpcServer("")
|
||||||
|
asyncCheck srv.serve()
|
||||||
|
|
||||||
suite "RPC":
|
suite "RPC":
|
||||||
proc main {.async.} =
|
proc main {.async.} =
|
||||||
var client = newRpcClient()
|
var client = newRpcClient()
|
||||||
@ -15,4 +19,3 @@ when isMainModule:
|
|||||||
check response.result.getStr == "3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532"
|
check response.result.getStr == "3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532"
|
||||||
|
|
||||||
waitFor main()
|
waitFor main()
|
||||||
echo "Finished."
|
|
Loading…
x
Reference in New Issue
Block a user