def testCreateAndDestroy(self): (self._img, self._mnt) = fixture.CreateSheepdogDisk(1024**3) self.assertIsNotNone(self._img) self.assertIsNotNone(self._mnt) self.assertTrue(os.path.isfile(self._img)) self.assertTrue(os.path.isdir(self._mnt)) self.assertEquals(1024**3, os.stat(self._img).st_size) self.assertTrue(fixture.DestroySheepdogDisk(self._img, self._mnt)) (self._img, self._mnt) = (None, None)
def tearDown(self): for t in self._disks: fixture.DestroySheepdogDisk(t[0], t[1])
def tearDown(self): fixture.ShutdownCluster() time.sleep(2) for t in self._disks: fixture.DestroySheepdogDisk(t[0], t[1])
def tearDownClass(clazz): fixture.ShutdownCluster() time.sleep(2) for t in clazz._disks: fixture.DestroySheepdogDisk(t[0], t[1])