114 Commits

Author SHA1 Message Date
jangko
a79f10f10f
adapt testserverclient for upcoming websocket test 2021-06-23 16:09:44 +07:00
Jacek Sieka
4eb39203eb
fixes (#95)
* fixes

* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups

* annotate exception issues, fix cancellation

* more error handling cleanup

* add rudimentary error tests

* cleanups

* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00
Joe Clapis
831471f6d4
Added the ability to handle omitted params fields in incoming requests, and a unit test for it (#94) 2021-02-07 20:27:34 +01:00
jangko
18dceaa29f
change tormund/news to status-im/news 2020-09-21 12:08:17 +07:00
Zahary Karadjov
f53e0b960b
Fix all tests 2020-03-17 22:05:42 +02:00
Ștefan Talpalaru
72a99cc977
replace getCurrentExceptionMsg() and delete some unused imports 2019-12-02 12:26:09 +01:00
Yuriy Glukhov
d4fbed75c7
Better error handling 2019-11-22 15:14:16 +02:00
Yuriy Glukhov
b583dfb029 Use closeWait 2019-06-17 19:56:19 +03:00
Yuriy Glukhov
f19d66b35c Websocket client support and some fixes 2019-06-12 20:53:15 +03:00
Ștefan Talpalaru
493583b7f4
cosmetic change 2019-05-10 22:08:30 +02:00
Ștefan Talpalaru
159f9b816e
assert() -> doAssert() 2019-03-13 22:42:07 +01:00
andri lim
b4a3273152 fix test 2019-01-12 16:17:19 +02:00
coffeepots
e1fad2e3ba Fix test using wrong rpc path 2018-11-26 18:33:47 +00:00
coffeepots
77b485c6ce More tests for optional fields inside objects 2018-11-26 18:12:26 +00:00
coffeepots
798e86112c Cover optional cases within objects 2018-11-26 18:03:56 +00:00
coffeepots
0160295743 Improve non-builtin optional test 2018-11-23 16:56:00 +00:00
coffeepots
066b06862d Add test for Option[T] where T is not a builtin 2018-11-23 16:11:12 +00:00
coffeepots
5e7f2d6a61
Merge pull request #42 from jangko/rpc_macro
add optional arg support to rpc macro
2018-11-19 10:58:38 +00:00
andri lim
a1fe7d57b4 allow optional parameters in the middle of parameters list 2018-11-16 20:07:39 +07:00
Zahary Karadjov
8bb6fdd3bf fix a wrong rebase 2018-11-12 23:54:29 +02:00
Zahary Karadjov
26953344c3 Turn some potentially dangerous templates into functions
Be careful when creating templates. If the input parameters are
referenced within the body multiple times, this may lead to multiple
evaluations of functions with side-effects.
2018-11-12 23:51:24 +02:00
andri lim
ee3ba6d5ad add optional arg support to rpc macro 2018-11-12 17:47:03 +07:00
coffeepots
5da9ce7881 Make all tests use port 8545 to check connection closing between tests 2018-09-13 19:27:51 +01:00
coffeepots
7a27a78122 Update testEthCalls and testRpcMacro with closeWait 2018-09-13 19:20:16 +01:00
coffeepots
f0eb9693af Use different port for socket test 2018-09-13 18:46:15 +01:00
coffeepots
b8b38c53c9 Update http test to use closeWait 2018-09-13 18:06:54 +01:00
coffeepots
0ba96afb13 Update socket test to use closeWait 2018-09-13 18:06:46 +01:00
coffeepots
0acb6997c7 Tests for option types 2018-08-29 14:16:03 +03:00
Zahary Karadjov
642fdd591f fix the package structure to make Nimble happy 2018-07-20 19:34:10 +03:00
andri lim
4aedb214b6 fixes #18, rpc macro now can accept multiple variables of one type 2018-07-17 10:06:29 +07:00
cheatfate
989c999dc7 Fix suite name in testhttp. 2018-07-14 11:01:05 +03:00
cheatfate
0942b0387d Add RpcHttpServer.
Add RpcHttpClient.
2018-07-14 10:51:54 +03:00
coffeepots
1ca1847600 Make client usable with different transports 2018-07-12 18:36:40 +01:00
coffeepots
6466b7e778 Update tests with newRpcSocketClient 2018-07-12 14:08:43 +01:00
coffeepots
e3a7ffd121 Merge rpcsocket into rpcserver 2018-07-12 09:43:44 +01:00
coffeepots
3b8e736f35 Wrap RPC exceptions in JSON 2018-07-11 18:27:50 +01:00
coffeepots
13ae592738 Rename sockets.nim to socket.nim and rpcsockets.nim to rpcsocket.nim 2018-07-11 10:40:20 +01:00
coffeepots
b218529d2d Remove generics from server and update sockettransport 2018-07-11 10:19:13 +01:00
coffeepots
f943c584c7 Add check for empty string 2018-07-09 09:43:23 +01:00
coffeepots
cf44cc552d Remove DSL, add router and simplify server 2018-07-06 17:47:43 +01:00
coffeepots
b968d96923 Fix to allow compilation of testerrors 2018-07-05 12:40:11 +01:00
coffeepots
2c92487e1a Remove redundant "done" echo 2018-06-26 16:29:09 +01:00
coffeepots
c4b27e40bf Add http test 2018-06-26 16:28:49 +01:00
coffeepots
d36da9d14c Added testing, uses http client and server 2018-06-26 15:45:40 +01:00
coffeepots
79e756bd3c Update tests to use rpcStreamClient 2018-06-22 19:06:03 +01:00
coffeepots
09b55a5b32 More error checking (WIP) 2018-06-21 18:40:49 +01:00
coffeepots
6b619472f3 Test errors WIP 2018-06-19 18:22:13 +01:00
coffeepots
49afd6ee76 Add simple test for HTTP (WIP) 2018-06-19 18:22:01 +01:00
coffeepots
e42864ef7a Remove testerrors from tests whilst fixing exceptions in rpcs 2018-06-19 18:18:48 +01:00
coffeepots
8d1174b136 Updated paths to use rpcserver now that streamservers are in there 2018-06-19 18:17:56 +01:00