Skip to content

Commit

Permalink
Merge pull request #1786 from rogers0/PR/tests
Browse files Browse the repository at this point in the history
tests: Update default dns setting in tests
  • Loading branch information
madeye authored Nov 16, 2017
2 parents f3c3080 + fc11e6a commit 9dcba19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
9 changes: 5 additions & 4 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@
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])
Expand Down
19 changes: 11 additions & 8 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9dcba19

Please sign in to comment.