Explorar el Código

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
teor hace 7 años
padre
commit
0df68e3a99
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7 3
      scripts/chutney_tests/verify.py

+ 7 - 3
scripts/chutney_tests/verify.py

@@ -63,14 +63,18 @@ def _verify_traffic(network):
     bind_to = (LISTEN_ADDR, LISTEN_PORT)
     bind_to = (LISTEN_ADDR, LISTEN_PORT)
     tt = chutney.Traffic.TrafficTester(bind_to, tmpdata, TIMEOUT, reps,
     tt = chutney.Traffic.TrafficTester(bind_to, tmpdata, TIMEOUT, reps,
                                        dot_reps)
                                        dot_reps)
+    # _env does not implement get() due to its fallback to parent behaviour
     client_list = filter(lambda n:
     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)
                          network._nodes)
     exit_list = filter(lambda n:
     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)
                        network._nodes)
     hs_list = filter(lambda n:
     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)
                      network._nodes)
     if len(client_list) == 0:
     if len(client_list) == 0:
         print("  Unable to verify network: no client nodes available")
         print("  Unable to verify network: no client nodes available")