2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/resource"
|
|
|
|
require "inspec/resources/zfs_pool"
|
2017-02-22 17:29:49 +00:00
|
|
|
|
|
|
|
describe Inspec::Resources::ZfsPool do
|
|
|
|
let(:loader) { MockLoader.new(:freebsd10) }
|
2019-06-11 22:24:35 +00:00
|
|
|
let(:tank_resource) { loader.send("load_resource", "zfs_pool", "tank") }
|
2017-02-22 17:29:49 +00:00
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
it "parses the ZFS pool data properly" do
|
2019-09-30 22:31:55 +00:00
|
|
|
_(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")
|
2017-02-22 17:29:49 +00:00
|
|
|
end
|
|
|
|
end
|