Closed KSDaemon closed 9 years ago
@KSDaemon Great! Could you please also add a unit test to make this PR :100: ?
@lipp Yeah. Can you point me where tests are and how to run them? I've found some related things in spec/* Is it there?
Ups. Sorry, read the docs to the end :) Will try to run and create tests
I've run the tests. There were: 41 successes / 1 failure / 5 errors / 0 pending : 15.716355 seconds Is it ok? Or all tests should pass?
Here are all errors. May be i've been missing something...
Failure → ./spec/tools_spec.lua @ 51 The tools module URL parser works ./spec/tools_spec.lua:57: Expected objects to be the same. Passed in: (number) 80 Expected: (string) '80'
Error → ./spec/client_ev_spec.lua @ 10 ./spec/client_ev_spec.lua ./spec/client_ev_spec.lua:10: attempt to call global 'setloop' (a nil value)
Error → ./spec/ev_common_spec.lua @ 6 ./spec/ev_common_spec.lua ./spec/ev_common_spec.lua:6: attempt to call global 'setloop' (a nil value)
Error → ./spec/server_copas_spec.lua @ 10 ./spec/server_copas_spec.lua ./spec/server_copas_spec.lua:10: attempt to call global 'setloop' (a nil value)
Error → ./spec/server_ev_spec.lua @ 9 ./spec/server_ev_spec.lua ./spec/server_ev_spec.lua:9: attempt to call global 'setloop' (a nil value)
Error → ./spec/tools_spec.lua @ 92 The tools module URL parser works with IPv6 and WSS ./spec/tools_spec.lua:118: attempt to call global 'parse_url' (a nil value)
Well... Interesting situation: Adding additional asserts to connect test in client_spec.lua results in failure, but specially failing same tests in client_ev_spec.lua results in success. May be you can help... See diff for my last commit
ill look into it...
Hi @lipp! How is it going?
sorry, ... pretty busy ... i didn't forget ...
i make a new PR, tests are working again on recent master
Hi, guys! On this weekend i decided to implement this feature. But i was a bit confused: in client_ev we can not simply return headers, 'cause things are async. So i extended response form on_open function — now it returns websocket object, server selected protocol and all response headers. For sync client — all return points in connect function are extended appropriately.