[tor-commits] [stem/master] Clarifying why test's load_conf() expects an exception

atagar at torproject.org atagar at torproject.org
Mon Jun 24 16:25:21 UTC 2013

commit 5f65f786dee22089323febc899bf2c85a53c99aa
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon Jun 24 09:23:16 2013 -0700

    Clarifying why test's load_conf() expects an exception
    For a long while I've been puzzled why this load_conf() call asserted an
    exception. When I ran it in a cusom prompt it ran fine - turned out that it was
    relying on us having a custom DataDir. Tor balks (rightfully) when we'd shift
    our DataDir out from a running tor instance.
    Doing a better job explaining what's up in the comment.
 test/integ/control/controller.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index bc9619c..c4b8fb1 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -545,7 +545,14 @@ class TestController(unittest.TestCase):
       oldconf = runner.get_torrc_contents()
-        # invalid requests
+        # Check a request that changes our DataDir. Tor should rightfully balk
+        # at this...
+        #
+        #   InvalidRequest: Transition not allowed: Failed to parse/validate
+        #   config: While Tor is running, changing DataDirectory
+        #   ("/home/atagar/Desktop/stem/test/data"->"/home/atagar/.tor") is not
+        #   allowed.
         self.assertRaises(stem.InvalidRequest, controller.load_conf, "ContactInfo confloaded")

More information about the tor-commits mailing list