]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Test that join adds tahoe config options
authorDavid Stainton <dstainton415@gmail.com>
Tue, 23 Jun 2015 19:34:18 +0000 (12:34 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 20 Jul 2015 23:42:34 +0000 (00:42 +0100)
src/allmydata/test/test_cli_magic_folder.py

index b8418ac7f020f7bb8806909c31ee0e6fab9ceaa0..77df1c1a9178ce0dced5d311360c4087d7176b5d 100644 (file)
@@ -1,5 +1,6 @@
 import os.path
 import urllib
+import re
 
 from twisted.trial import unittest
 
@@ -30,15 +31,21 @@ class CreateMagicFolder(GridTestMixin, CLITestMixin, unittest.TestCase):
 
     def _join(self, result):
         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
 
+    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):
         self.basedir = "cli/MagicFolder/create-and-then-invite-join"
         self.set_up_grid()
         d = self._create_magic_folder()
         d.addCallback(self._invite)
         d.addCallback(self._join)
+        d.addCallback(self._check_config)
         return d
 
     def test_create_invite_join(self):