示例#1
0
    def _create_fs(self, remote_filesystems):
        """Create the cuckoo drive fileystem out of the remote filesystems"""
        multifs = CuckooDriveFS.verbose_fs(WritableMultiFS(), "MultiFS",
                                           self.verbose)
        for idx, remote_fs in enumerate(remote_filesystems):
            multifs.addfs("Remote{0}".format(idx), remote_fs)

        return CuckooDriveFS.verbose_fs(PartedFS(multifs, self.file_size),
                                        "PartedFS", self.verbose)
示例#2
0
class TestExternalPartedFS(unittest.TestCase, FSTestCases):
    def setUp(self):
        self.fs = PartedFS(MemoryFS(), kb(100))

    def tearDown(self):
        self.fs.close()

    @mark.xfail(reason="Appending does not work yet")
    def test_readwriteappendseek(self):
        super(TestExternalPartedFS, self).test_readwriteappendseek()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate_to_larger_size(self):
        super(TestExternalPartedFS, self).test_truncate_to_larger_size()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate(self):
        super(TestExternalPartedFS, self).test_truncate()
示例#3
0
class TestExternalPartedFS(unittest.TestCase, FSTestCases):
    def setUp(self):
        self.fs = PartedFS(MemoryFS(), kb(100))

    def tearDown(self):
        self.fs.close()

    @mark.xfail(reason="Appending does not work yet")
    def test_readwriteappendseek(self):
        super(TestExternalPartedFS, self).test_readwriteappendseek()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate_to_larger_size(self):
        super(TestExternalPartedFS, self).test_truncate_to_larger_size()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate(self):
        super(TestExternalPartedFS, self).test_truncate()
示例#4
0
 def fs(self):
     return PartedFS(MemoryFS(), kb(4))
示例#5
0
 def setUp(self):
     self.fs = PartedFS(MemoryFS(), kb(100))
示例#6
0
 def setUp(self):
     self.fs = PartedFS(MemoryFS(), kb(100))