[chutney/master] Test OLD clients, bridge clients, and hidden services in mixed networks

commit 0df68e3a9950dc0d36387a31121497531ad12597 Author: teor <teor2345@gmail.com> Date: Wed Sep 13 14:20:24 2017 +1000 Test OLD clients, bridge clients, and hidden services in mixed networks Chutney uses tags and attributes to find clients and hidden services, for compatibility with old custom networks. Implements 22224 --- scripts/chutney_tests/verify.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/chutney_tests/verify.py b/scripts/chutney_tests/verify.py index 98beb74..063bf8f 100644 --- a/scripts/chutney_tests/verify.py +++ b/scripts/chutney_tests/verify.py @@ -63,14 +63,18 @@ def _verify_traffic(network): bind_to = (LISTEN_ADDR, LISTEN_PORT) tt = chutney.Traffic.TrafficTester(bind_to, tmpdata, TIMEOUT, reps, dot_reps) + # _env does not implement get() due to its fallback to parent behaviour client_list = filter(lambda n: - n._env['tag'] == 'c' or n._env['tag'] == 'bc', + n._env['tag'].startswith('c') or + n._env['tag'].startswith('bc') or + ('client' in n._env.keys() and n._env['client'] == 1), network._nodes) exit_list = filter(lambda n: - ('exit' in n._env.keys()) and n._env['exit'] == 1, + ('exit' in n._env.keys() and n._env['exit'] == 1), network._nodes) hs_list = filter(lambda n: - n._env['tag'] == 'h', + n._env['tag'].startswith('h') or + ('hs' in n._env.keys() and n._env['hs'] == 1), network._nodes) if len(client_list) == 0: print(" Unable to verify network: no client nodes available")
participants (1)
-
teor@torproject.org