[stem/master] Config changes broke integ tests

commit cde6de6bb3c132ba657ed2135ece83b9d3b60190 Author: Damian Johnson <atagar@torproject.org> Date: Thu Jan 3 08:46:05 2013 -0800 Config changes broke integ tests Shame on me for not running the integ tests (they're sluggish enough that I run the unit tests a lot more). I both missed a get_str_csv() usage (grepped the wrong thing) and an integ test with a synchronize() call. --- run_tests.py | 16 ++++++++++------ test/integ/util/conf.py | 13 +++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/run_tests.py b/run_tests.py index fdc2696..55948bd 100755 --- a/run_tests.py +++ b/run_tests.py @@ -390,14 +390,18 @@ if __name__ == '__main__': try: # converts the 'target.torrc' csv into a list of test.runner.Torrc enums + config_csv = CONFIG["target.torrc"].get(target) torrc_opts = [] - for opt in test_config.get_str_csv("target.torrc", [], sub_key = target): - if opt in test.runner.Torrc.keys(): - torrc_opts.append(test.runner.Torrc[opt]) - else: - test.output.print_line("'%s' isn't a test.runner.Torrc enumeration" % opt) - sys.exit(1) + if config_csv: + for opt in config_csv.split(','): + opt = opt.strip() + + if opt in test.runner.Torrc.keys(): + torrc_opts.append(test.runner.Torrc[opt]) + else: + test.output.print_line("'%s' isn't a test.runner.Torrc enumeration" % opt) + sys.exit(1) integ_runner.start(CONFIG["argument.tor"], extra_torrc_opts = torrc_opts) diff --git a/test/integ/util/conf.py b/test/integ/util/conf.py index a429f2a..c51bc0c 100644 --- a/test/integ/util/conf.py +++ b/test/integ/util/conf.py @@ -80,16 +80,17 @@ class TestConf(unittest.TestCase): Checks that the pydoc example is correct. """ - ssh_config = {"login.user": "atagar", - "login.password": "pepperjack_is_awesome!", - "destination.ip": "127.0.0.1", - "destination.port": 22, - "startup.run": []} + ssh_config = stem.util.conf.config_dict("integ_testing", { + "login.user": "atagar", + "login.password": "pepperjack_is_awesome!", + "destination.ip": "127.0.0.1", + "destination.port": 22, + "startup.run": [], + }) test_config_path = _make_config(EXAMPLE_CONF) user_config = stem.util.conf.get_config("integ_testing") user_config.load(test_config_path) - user_config.synchronize(ssh_config) self.assertEquals("atagar", ssh_config["login.user"]) self.assertEquals("pepperjack_is_awesome!", ssh_config["login.password"])
participants (1)
-
atagar@torproject.org