2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/resource"
|
|
|
|
require "inspec/resources/ini"
|
2015-11-24 12:06:31 +00:00
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
describe "Inspec::Resources::Ini" do
|
2015-11-24 12:06:31 +00:00
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
it "check ini parsing on ubuntu" do
|
|
|
|
resource = MockLoader.new(:ubuntu1404).load_resource("ini", "rootwrap.conf")
|
|
|
|
result = { "DEFAULT" => { "filters_path" => "/etc/cinder/rootwrap.d,/usr/share/cinder/rootwrap", "exec_dirs" => "/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin" } }
|
2015-11-24 12:06:31 +00:00
|
|
|
_(resource.params).must_equal result
|
2019-06-11 22:24:35 +00:00
|
|
|
_(resource.value(%w{DEFAULT exec_dirs})).must_equal "/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin"
|
2015-11-24 12:06:31 +00:00
|
|
|
end
|
|
|
|
end
|