mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
607d9a1ebc
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
18 lines
756 B
Ruby
18 lines
756 B
Ruby
require "helper"
|
|
require "inspec/resource"
|
|
require "inspec/resources/mongodb_conf"
|
|
|
|
describe "Inspec::Resources::MongodbConf" do
|
|
it "verify mongd.conf config parsing" do
|
|
resource = load_resource("mongodb_conf", "/etc/mongod.conf")
|
|
_(resource.params["storage"]["dbPath"]).must_equal "/var/lib/mongodb"
|
|
_(resource.params["systemLog"]["path"]).must_equal "/var/log/mongodb/mongod.log"
|
|
_(resource.params["net"]["port"]).must_equal 27017
|
|
end
|
|
|
|
it "verify mongd.conf config parsing use default configuration file location." do
|
|
resource = load_resource("mongodb_conf")
|
|
_(resource.params["storage"]["dbPath"]).must_equal "/var/lib/mongodb"
|
|
_(resource.params["systemLog"]["path"]).must_equal "/var/log/mongodb/mongod.log"
|
|
end
|
|
end
|