[tor-commits] [stem/master] Add a stem test to look for regressions in Tor ticket 31495.

atagar at torproject.org atagar at torproject.org
Mon Dec 9 19:46:01 UTC 2019


commit ab44af05e4165f68da67870b434b705e8ffb4e86
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Oct 8 18:03:59 2019 -0400

    Add a stem test to look for regressions in Tor ticket 31495.
    
    This closes Tor ticket 31909.
---
 test/integ/control/controller.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index ba4037d8..e7c979b2 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -784,6 +784,23 @@ class TestController(unittest.TestCase):
         shutil.rmtree(tmpdir)
 
   @test.require.controller
+  def test_set_conf_31495_regression(self):
+    """
+    Make sure that we can set UseBridges=1 and set a Bridge, to
+    check for a regression in Tor bug 31945.
+    """
+    with test.runner.get_runner().get_tor_controller() as controller:
+      # Make sure we aren't a relay, so that we can set UseBridges.
+      controller.set_conf("ORPort", "0")
+
+      # Try setting UseBridges, to make sure we don't reject the request.
+      controller.set_options([("UseBridges", "1"),
+                              ("Bridge", "127.0.0.1:9999")])
+
+      # Set UseBridges back again to avoid problems in later tests.
+      controller.set_conf("UseBridges", "0")
+
+  @test.require.controller
   def test_set_conf_when_immutable(self):
     """
     Issue a SETCONF for tor options that cannot be changed while running.





More information about the tor-commits mailing list