mirror of
https://github.com/inspec/inspec
synced 2024-12-21 10:33:23 +00:00
1fdecc6680
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>
17 lines
542 B
Ruby
17 lines
542 B
Ruby
# encoding: utf-8
|
|
# author: Joseph Benden
|
|
|
|
require 'helper'
|
|
require 'inspec/resource'
|
|
|
|
describe Inspec::Resources::ZfsPool do
|
|
let(:loader) { MockLoader.new(:freebsd10) }
|
|
let(:tank_resource) { loader.send('load_resource', 'zfs_pool', 'tank') }
|
|
|
|
it 'parses the ZFS pool data properly' do
|
|
tank_resource.send(:health).must_equal('ONLINE')
|
|
tank_resource.send(:guid).must_equal('4711279777582057513')
|
|
tank_resource.send(:failmode).must_equal('continue')
|
|
tank_resource.send(:'feature@lz4_compress').must_equal('active')
|
|
end
|
|
end
|