Esempio n. 1
0
    def test_003_get_zdataset_properties(self):
        dataset = ZDataset.get(name=LIBZFS_TEST_POOL)
        props = dataset.properties

        dstype = dataset.type
        dstype_name = ffi.string(libzfs.zfs_type_to_name(dstype))

        assert len(props.keys()) > 0
        assert props.get(zfs_prop_t.ZFS_PROP_NAME) == LIBZFS_TEST_POOL
        assert props.get(zfs_prop_t.ZFS_PROP_TYPE) == dstype_name
Esempio n. 2
0
 def test_004_get_zdataset_children(self):
     dataset = ZDataset.get(name=LIBZFS_TEST_POOL)
     assert dataset.children is not None
     assert dataset.child_filesystems is not None
     assert dataset.child_snapshots is not None
Esempio n. 3
0
 def test_002_get_zdataset(self):
     dataset = ZDataset.get(name=LIBZFS_TEST_POOL)
     assert dataset is not None
Esempio n. 4
0
 def test_001_iter_zdatasets(self):
     datasets = ZDataset.list()
     assert len(datasets) > 0