mirror of
https://github.com/inspec/inspec
synced 2024-12-26 21:13:25 +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
543 B
Ruby
17 lines
543 B
Ruby
# encoding: utf-8
|
|
# author: Joseph Benden
|
|
|
|
require 'helper'
|
|
require 'inspec/resource'
|
|
|
|
describe Inspec::Resources::ZfsDataset do
|
|
let(:loader) { MockLoader.new(:freebsd10) }
|
|
let(:tank_tmp_resource) { loader.send('load_resource', 'zfs_dataset', 'tank/tmp') }
|
|
|
|
it 'parses the ZFS dataset data properly' do
|
|
tank_tmp_resource.send(:mountpoint).must_equal('/tmp')
|
|
tank_tmp_resource.send(:type).must_equal('filesystem')
|
|
tank_tmp_resource.send(:exec).must_equal('off')
|
|
tank_tmp_resource.send(:setuid).must_equal('off')
|
|
end
|
|
end
|