Ejemplo n.º 1
0
    def test_set_name_returns_none(self):
        dbg = mock.Mock()
        with util.TestFFSPath() as testffspath:
            testvolume = testffspath.create_test_volume()

            set_name_result = volume.Implementation().set_name(
                dbg, testffspath.get_uri(), testvolume, "testname")

            self.assertIsNone(set_name_result)
Ejemplo n.º 2
0
    def test_destroy_returns_none(self):
        dbg = mock.Mock()
        with util.TestFFSPath() as testffspath:
            testvolume = testffspath.create_test_volume()

            destroy_result = volume.Implementation().destroy(
                dbg, testffspath.get_uri(), testvolume)

            self.assertIsNone(destroy_result)
Ejemplo n.º 3
0
    def test_clone_returns_valid_dict(self, resume_datapath_in_pool,
                                      suspend_datapath_in_pool):
        dbg = mock.Mock()
        with util.TestFFSPath() as testffspath:
            testvolume = testffspath.create_test_volume()

            clone_result = volume.Implementation().clone(
                dbg, testffspath.get_uri(), testvolume)

        self.check_volume_stat_result(clone_result)
Ejemplo n.º 4
0
    def test_stat_returns_valid_dict(self):
        dbg = mock.Mock()
        with util.TestFFSPath() as testffspath:
            testvolume = testffspath.create_test_volume()

            stat_result = volume.Implementation().stat(dbg,
                                                       testffspath.get_uri(),
                                                       testvolume)

        self.check_volume_stat_result(stat_result)
Ejemplo n.º 5
0
    def test_create_returns_valid_dict(self):
        dbg = mock.Mock()
        name = "testname"
        description = "testdescription"
        size = 1337
        with util.TestFFSPath() as testffspath:

            create_result = volume.Implementation().create(
                dbg, testffspath.get_uri(), name, description, size)

        self.check_volume_stat_result(create_result)