zfs: public ZFSList() function + consolidation of mapping code

This commit is contained in:
Christian Schwarz
2017-05-01 20:35:04 +02:00
parent 28f0b90c25
commit 644d3dd06b
3 changed files with 55 additions and 46 deletions

View File

@ -10,9 +10,7 @@ func TestZFSListHandlesProducesZFSErrorOnNonZeroExit(t *testing.T) {
ZFS_BINARY = "./test_helpers/zfs_failer.sh"
_, err = zfsList("nonexistent/dataset", func(p DatasetPath) bool {
return true
})
_, err = ZFSList([]string{"fictionalprop"}, "nonexistent/dataset")
assert.Error(t, err)
zfsError, ok := err.(ZFSError)