mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 21:43:09 +00:00
Test that join adds tahoe config options
This commit is contained in:
parent
14603bce7c
commit
d384d4edca
@ -1,5 +1,6 @@
|
|||||||
import os.path
|
import os.path
|
||||||
import urllib
|
import urllib
|
||||||
|
import re
|
||||||
|
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
@ -30,15 +31,21 @@ class CreateMagicFolder(GridTestMixin, CLITestMixin, unittest.TestCase):
|
|||||||
|
|
||||||
def _join(self, result):
|
def _join(self, result):
|
||||||
invite_code = result[1].strip()
|
invite_code = result[1].strip()
|
||||||
d = self.do_cli("magic-folder", "join", invite_code, u"LOCAL_DIR")
|
d = self.do_cli("magic-folder", "join", invite_code, u"Alice_local_magic")
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
def _check_config(self, result):
|
||||||
|
client_config = fileutil.read(os.path.join(self.get_clientdir(), "tahoe.cfg"))
|
||||||
|
ret = re.search(r'\[magic_folder\]\nenabled = True\nlocal.directory = Alice_local_magic', client_config)
|
||||||
|
self.failIf(ret is None)
|
||||||
|
|
||||||
def test_create_and_then_invite_join(self):
|
def test_create_and_then_invite_join(self):
|
||||||
self.basedir = "cli/MagicFolder/create-and-then-invite-join"
|
self.basedir = "cli/MagicFolder/create-and-then-invite-join"
|
||||||
self.set_up_grid()
|
self.set_up_grid()
|
||||||
d = self._create_magic_folder()
|
d = self._create_magic_folder()
|
||||||
d.addCallback(self._invite)
|
d.addCallback(self._invite)
|
||||||
d.addCallback(self._join)
|
d.addCallback(self._join)
|
||||||
|
d.addCallback(self._check_config)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_create_invite_join(self):
|
def test_create_invite_join(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user