inspec/test/resource/zfs_test.rb
Joseph Benden 1fdecc6680 Add FreeBSD support for ZFS datasets and pools
The following new resources have been added; however, they
presently only support FreeBSD and similar.

* `zfs_dataset`: tests if a named ZFS dataset is present
  and/or has certain properties.
* `zfs_pool`: tests if a named ZFS pool is present and/or
  has certain properties.

Additionally, the `mount` resource has been reworked to
include support for FreeBSD; while the existing class
was renamed to LinuxMountParser.

Unit-tests were added for all of the above.

Signed-off-by: Joseph Benden <joe@benden.us>
2017-02-22 10:29:49 -07:00

16 lines
349 B
Ruby

# encoding: utf-8
# author: Joseph Benden
return unless os.bsd?
return unless command('/sbin/zfs').exist?
return unless command('/sbin/zpool').exist?
describe zfs_pool('tank') do
it { should exist }
its('failmode') { should eq('continue') }
end
describe zfs_dataset('tank/tmp') do
it { should exist }
its('exec') { should eq('off') }
end