-
- Downloads
Support additional test torrc options
Teor would like to run stem's integ tests against a Chutnet network... https://trac.torproject.org/projects/tor/ticket/30702 Highly unusual use case, but making it possible. Stem now accepts a STEM_TEST_CONFIG environment variable that overwrites any internal testing configuration values (see test/settings.cfg), along with a 'integ.extra_torrc' option. So to use this... 1. Write a file that overwrites our integ.extra_torrc configuration. Available macros include... [DATA_DIR] [OR_PORT] [SOCKS_PORT] 2. Set STEM_TEST_CONFIG to the path of that file. 3. Run our integ tests, and check the beginning of the output where it says 'writing torrc' to confirm that the torrc looks as you expect. For example... % cat /home/atagar/Desktop/stem/my_test_config integ.extra_torrc |Nickname Demo[OR_PORT] |FetchUselessDescriptors 1 % export STEM_TEST_CONFIG=/home/atagar/Desktop/stem/my_test_config % ./run_tests.py --integ ... Setting up a test instance... making test directory (/home/atagar/Desktop/stem/test/data)... done configuring logger (/home/atagar/Desktop/stem/test/data/log)... done writing torrc (/home/atagar/Desktop/stem/test/data/torrc)... done # Configuration for stem's integration tests DataDirectory /home/atagar/Desktop/stem/test/data SocksPort 1112 ORPort 1113 ExitRelay 0 PublishServerDescriptor 0 AssumeReachable 1 DownloadExtraInfo 1 Log notice stdout Log debug file /home/atagar/Desktop/stem/test/data/tor_log # Torrc options for the RUN_OPEN target ControlPort 1111 # Torrc options from /home/atagar/Desktop/stem/my_test_config Nickname Demo1113 FetchUselessDescriptors 1
Please register or sign in to comment