Commit Graph
8 Commits
Author SHA1 Message Date
Boyuan Yang defa4f8dcf tests/test.py: Make script compatible with python3
Currently the test script assumes the returned web page is always encoded in UTF-8, which might not be the case. It is likely that the real encoding is `ISO-8859-1` and that running the script under python3 will raise error:

```
< 
{ [11931 bytes data]
100 11923    0 11923    0     0   184k      0 --:--:-- --:--:-- --:--:--  187k
Traceback (most recent call last):
  File "tests/test.py", line 106, in <module>
    line = str(line, 'utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 1105: invalid start byte
```
This pull request makes no assumption on the returned data and send the raw output to stderr as `bytes`. This should allow the test script to finish successfully when `tests/test.py` is run by python3.
2020-01-31 16:11:21 -05:00
Colin Watson 4a4531d866 skip tests if an upstream HTTP proxy is set
shadowsocks-libev doesn't support connecting through an upstream HTTP
proxy, so if the test environment requires that then there's nothing we can
do.  (In future it might be possible to set up a local server to avoid this
problem.)
2018-06-09 16:31:25 +09:00
Roger Shimizu 44c557c170 Update config under tests/ folder
Fix tests by using "local" setting instead of "local_address" in config.

This is mentioned in:
- https://github.com/shadowsocks/shadowsocks-libev/issues/247
2018-06-09 15:54:08 +09:00
Roger Shimizu 1637ff6127 tests: Change the port to listen from 8388 to 8389
8388 is already taken by default config, so for test suites it's
better to choose a different port.
2017-12-17 15:15:27 +09:00
Roger Shimizu fc11e6ae8a tests: run tests binary either in src/ folder or system 2017-11-16 00:32:16 +09:00
Roger Shimizu ad76fd526e tests: Add param --bin to specify the binrary path
Default is to use the system installed version, in $PATH.
2017-11-16 00:10:33 +09:00
Roger Shimizu 7c38284334 tests: Update default dns setting in tests
Set default dns to 8.8.8.8 for tests/test.py
2017-11-15 23:10:46 +09:00
Max Lv f3c3080b94 Fix #1782 2017-11-13 10:40:28 +08:00