From 44c557c170f8eba5e8ce22c0c8306078ea91bb26 Mon Sep 17 00:00:00 2001 From: Roger Shimizu Date: Sat, 9 Jun 2018 15:54:08 +0900 Subject: [PATCH 1/2] 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 --- tests/aes-ctr.json | 2 +- tests/aes-gcm.json | 2 +- tests/aes.json | 2 +- tests/chacha20-ietf-poly1305.json | 2 +- tests/chacha20-ietf.json | 2 +- tests/chacha20.json | 2 +- tests/rc4-md5.json | 2 +- tests/salsa20.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/aes-ctr.json b/tests/aes-ctr.json index 44ba6a28..417ccb97 100644 --- a/tests/aes-ctr.json +++ b/tests/aes-ctr.json @@ -5,6 +5,6 @@ "password":"aes_password", "timeout":60, "method":"aes-256-ctr", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/aes-gcm.json b/tests/aes-gcm.json index 2f74baa0..2341786c 100644 --- a/tests/aes-gcm.json +++ b/tests/aes-gcm.json @@ -5,6 +5,6 @@ "password":"aes_password", "timeout":60, "method":"aes-256-gcm", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/aes.json b/tests/aes.json index 1b3b738b..14bbe22f 100644 --- a/tests/aes.json +++ b/tests/aes.json @@ -5,6 +5,6 @@ "password":"aes_password", "timeout":60, "method":"aes-256-cfb", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/chacha20-ietf-poly1305.json b/tests/chacha20-ietf-poly1305.json index 705393dd..bca655c8 100644 --- a/tests/chacha20-ietf-poly1305.json +++ b/tests/chacha20-ietf-poly1305.json @@ -5,6 +5,6 @@ "password":"salsa20_password", "timeout":60, "method":"chacha20-ietf-poly1305", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/chacha20-ietf.json b/tests/chacha20-ietf.json index 2a062a4f..45841b93 100644 --- a/tests/chacha20-ietf.json +++ b/tests/chacha20-ietf.json @@ -5,6 +5,6 @@ "password":"salsa20_password", "timeout":60, "method":"chacha20-ietf", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/chacha20.json b/tests/chacha20.json index 5c316863..35b5f8af 100644 --- a/tests/chacha20.json +++ b/tests/chacha20.json @@ -5,6 +5,6 @@ "password":"chacha20_password", "timeout":60, "method":"chacha20", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/rc4-md5.json b/tests/rc4-md5.json index eb08beea..3e0a9abf 100644 --- a/tests/rc4-md5.json +++ b/tests/rc4-md5.json @@ -5,6 +5,6 @@ "password":"aes_password", "timeout":60, "method":"rc4-md5", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } diff --git a/tests/salsa20.json b/tests/salsa20.json index 3729b460..58860b3a 100644 --- a/tests/salsa20.json +++ b/tests/salsa20.json @@ -5,6 +5,6 @@ "password":"salsa20_password", "timeout":60, "method":"salsa20", - "local_address":"127.0.0.1", + "local":"127.0.0.1", "fast_open":false } From 4a4531d866d76762b9e93627d7d56c6b368284ed Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 1 Feb 2018 13:46:47 +0000 Subject: [PATCH 2/2] 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.) --- tests/test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test.sh b/tests/test.sh index 1dcd15fc..b666eb1a 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -27,6 +27,11 @@ function run_test { [ -d src -a -x src/ss-local ] && BIN="--bin src/" +if [ "$http_proxy" ]; then + echo "SKIP: shadowsocks-libev does not support an upstream HTTP proxy" + exit 0 +fi + run_test python tests/test.py $BIN -c tests/aes.json run_test python tests/test.py $BIN -c tests/aes-gcm.json run_test python tests/test.py $BIN -c tests/aes-ctr.json