mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
Added test_check_with_multiple_aliases in test_cli
This commit is contained in:
parent
bf235849c9
commit
71504699a2
@ -3298,6 +3298,37 @@ class Check(GridTestMixin, CLITestMixin, unittest.TestCase):
|
||||
d.addCallback(_check)
|
||||
return d
|
||||
|
||||
def test_check_with_multiple_aliases(self):
|
||||
self.basedir = "cli/Check/check_with_multiple_aliases"
|
||||
self.set_up_grid()
|
||||
self.uriList = []
|
||||
c0 = self.g.clients[0]
|
||||
d = c0.create_dirnode()
|
||||
def _stash_uri(n):
|
||||
self.uriList.append(n.get_uri())
|
||||
d.addCallback(_stash_uri)
|
||||
d = c0.create_dirnode()
|
||||
d.addCallback(_stash_uri)
|
||||
|
||||
d.addCallback(lambda ign: self.do_cli("check", self.uriList[0], self.uriList[1]))
|
||||
def _check((rc, out, err)):
|
||||
self.failUnlessReallyEqual(rc, 0)
|
||||
self.failUnlessReallyEqual(err, "")
|
||||
#Ensure healthy appears for each uri
|
||||
self.failUnlessIn("Healthy", out[:len(out)/2])
|
||||
self.failUnlessIn("Healthy", out[len(out)/2:])
|
||||
d.addCallback(_check)
|
||||
|
||||
d.addCallback(lambda ign: self.do_cli("check", self.uriList[0], "nonexistent:"))
|
||||
def _check2((rc, out, err)):
|
||||
self.failUnlessReallyEqual(rc, 1)
|
||||
self.failUnlessIn("Healthy", out)
|
||||
self.failUnlessIn("error:", err)
|
||||
self.failUnlessIn("nonexistent", err)
|
||||
d.addCallback(_check2)
|
||||
|
||||
return d
|
||||
|
||||
|
||||
class Errors(GridTestMixin, CLITestMixin, unittest.TestCase):
|
||||
def test_get(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user