]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Work in progress to fix tests. 2227.format-mutable.0
authorDaira Hopwood <daira@jacaranda.org>
Tue, 11 Aug 2015 17:24:53 +0000 (18:24 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 11 Aug 2015 17:24:53 +0000 (18:24 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_cli.py
src/allmydata/test/test_cli_create_alias.py

index b59a2b1b1aab9eb8a734c5b575b20ef2b98c6bfc..d3d854636d13ca8d7a2d89e64eb2f5536f4c75b4 100644 (file)
@@ -934,10 +934,10 @@ class Mkdir(GridTestMixin, CLITestMixin, unittest.TestCase):
         self.basedir = os.path.dirname(self.mktemp())
         self.set_up_grid()
         d = self.do_cli("create-alias", "tahoe")
-        def _check((rc, out, err), st):
-            self.failUnlessReallyEqual(rc, 0)
-            self.failUnlessReallyEqual(err, "")
-            self.failUnlessIn(st, out)
+        def _check((rc, out, err), st, what):
+            self.failUnlessReallyEqual(rc, 0, what)
+            self.failUnlessReallyEqual(err, "", what)
+            self.failUnlessIn(st, out, what)
             return out
         def _mkdir(ign, mutable_type, uri_prefix, dirname):
             d2 = self.do_cli("mkdir", "--format="+mutable_type, dirname)
@@ -950,7 +950,8 @@ class Mkdir(GridTestMixin, CLITestMixin, unittest.TestCase):
             d2.addCallback(lambda ign: self.do_cli("ls", "--json", dirname))
             d2.addCallback(_check, uri_prefix)
             d2.addCallback(lambda ign: self.do_cli("ls", "--json", self._filecap))
-            d2.addCallback(_check, '"format": "%s"' % (mutable_type.upper(),))
+            d2.addCallback(_check, '"format": "%s"' % (mutable_type.upper(),),
+                           (mutable_type, uri_prefix, dirname))
             return d2
 
         d.addCallback(_mkdir, "sdmf", "URI:DIR2", "tahoe:foo")
index ae3cd5bdbc000737cfe8da183521f482959b1d1d..7b7d5bc012ed4f14c69cfbe30810feb75c752816 100644 (file)
@@ -163,7 +163,8 @@ class CreateAlias(GridTestMixin, CLITestMixin, unittest.TestCase):
             self.failUnlessIn("Alias %s created" % quote_output(u"\u00E9tudes"), out)
 
             aliases = get_aliases(self.get_clientdir())
-            self.failUnless(aliases[u"\u00E9tudes"].startswith("URI:DIR2:"))
+            etudes_alias = aliases[u"\u00E9tudes"]
+            self.failUnless(etudes_alias.startswith("URI:DIR2-MDMF:"), etudes_alias)
         d.addCallback(_check_create_unicode)
 
         d.addCallback(lambda res: self.do_cli("ls", etudes_arg + ":"))