Browse Source

Merge pull request #1786 from rogers0/PR/tests

tests: Update default dns setting in tests
pull/1792/merge
Max Lv 7 years ago
committed by GitHub
parent
commit
9dcba192c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions
  1. 9
      tests/test.py
  2. 19
      tests/test.sh

9
tests/test.py

@ -35,13 +35,14 @@ parser.add_argument('-a', '--client-args', type=str, default=None)
parser.add_argument('-b', '--server-args', type=str, default=None)
parser.add_argument('--should-fail', action='store_true', default=None)
parser.add_argument('--url', type=str, default=default_url)
parser.add_argument('--dns', type=str, default='10.19.185.252')
parser.add_argument('--dns', type=str, default='8.8.8.8')
parser.add_argument('--bin', type=str, default='')
config = parser.parse_args()
client_args = ['src/ss-local', '-v']
server_args = ['src/ss-server', '-v', '-u']
tunnel_args = ['src/ss-tunnel', '-v', '-u', '-l1082', '-L%s:53' % config.dns]
client_args = ['%s%s' % (config.bin, 'ss-local'), '-v']
server_args = ['%s%s' % (config.bin, 'ss-server'), '-v', '-u']
tunnel_args = ['%s%s' % (config.bin, 'ss-tunnel'), '-v', '-u', '-l1082', '-L%s:53' % config.dns]
if config.client_conf:
client_args.extend(['-c', config.client_conf])

19
tests/test.sh

@ -24,13 +24,16 @@ function run_test {
return 0
}
run_test python tests/test.py -c tests/aes.json
run_test python tests/test.py -c tests/aes-gcm.json
run_test python tests/test.py -c tests/aes-ctr.json
run_test python tests/test.py -c tests/rc4-md5.json
run_test python tests/test.py -c tests/salsa20.json
run_test python tests/test.py -c tests/chacha20.json
run_test python tests/test.py -c tests/chacha20-ietf.json
run_test python tests/test.py -c tests/chacha20-ietf-poly1305.json
[ -d src -a -x src/ss-local ] &&
BIN="--bin src/"
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
run_test python tests/test.py $BIN -c tests/rc4-md5.json
run_test python tests/test.py $BIN -c tests/salsa20.json
run_test python tests/test.py $BIN -c tests/chacha20.json
run_test python tests/test.py $BIN -c tests/chacha20-ietf.json
run_test python tests/test.py $BIN -c tests/chacha20-ietf-poly1305.json
exit $result
Loading…
Cancel
Save