mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 19:34:18 +00:00
fix syntax (tcp=disabled, not =none), add test
This commit is contained in:
parent
3c22a3ce50
commit
ee58637813
@ -217,7 +217,7 @@ def write_node_config(c, config):
|
||||
if tor_provider._import_txtorcon():
|
||||
c.write("tcp = tor\n")
|
||||
else:
|
||||
c.write("tcp = none\n")
|
||||
c.write("tcp = disabled\n")
|
||||
c.write("\n")
|
||||
|
||||
c.write("[node]\n")
|
||||
|
@ -109,6 +109,18 @@ class Config(unittest.TestCase):
|
||||
self.assertEqual(cfg.getboolean("node", "reveal-IP-address"), False)
|
||||
self.assertEqual(cfg.get("connections", "tcp"), "tor")
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_client_hide_ip_no_txtorcon(self):
|
||||
txtorcon = mock.patch('allmydata.util.tor_provider._import_txtorcon',
|
||||
return_value=None)
|
||||
with txtorcon:
|
||||
basedir = self.mktemp()
|
||||
rc, out, err = yield run_cli("create-client", "--hide-ip", basedir)
|
||||
self.assertEqual(0, rc)
|
||||
cfg = read_config(basedir)
|
||||
self.assertEqual(cfg.getboolean("node", "reveal-IP-address"), False)
|
||||
self.assertEqual(cfg.get("connections", "tcp"), "disabled")
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_client_basedir_exists(self):
|
||||
basedir = self.mktemp()
|
||||
|
Loading…
x
Reference in New Issue
Block a user