Add to params for tests

Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
This commit is contained in:
Mendy Baitelman 2019-09-24 21:49:29 -07:00
parent b2c29da936
commit 76cd799c92

View file

@ -205,7 +205,7 @@ describe "Inspec::Resources::Service" do
it "verify centos 7 service parsing with static loaded service" do it "verify centos 7 service parsing with static loaded service" do
resource = MockLoader.new(:centos7).load_resource("service", "dbus") resource = MockLoader.new(:centos7).load_resource("service", "dbus")
params = Hashie::Mash.new({ "Description" => "D-Bus System Message Bus", "Id" => "dbus.service", "LoadState" => "loaded", "Names" => "messagebus.service dbus.service", "SubState" => "running", "UnitFileState" => "static" }) params = Hashie::Mash.new({ "Description" => "D-Bus System Message Bus", "Id" => "dbus.service", "LoadState" => "loaded", "Names" => "messagebus.service dbus.service", "SubState" => "running", "UnitFileState" => "static", "User" => "root" })
_(resource.type).must_equal "systemd" _(resource.type).must_equal "systemd"
_(resource.name).must_equal "dbus.service" _(resource.name).must_equal "dbus.service"
_(resource.description).must_equal "D-Bus System Message Bus" _(resource.description).must_equal "D-Bus System Message Bus"
@ -244,7 +244,7 @@ describe "Inspec::Resources::Service" do
it "verify cloudlinux 7 service parsing with static loaded service" do it "verify cloudlinux 7 service parsing with static loaded service" do
resource = MockLoader.new(:cloudlinux).load_resource("service", "dbus") resource = MockLoader.new(:cloudlinux).load_resource("service", "dbus")
params = Hashie::Mash.new({ "Description" => "D-Bus System Message Bus", "Id" => "dbus.service", "LoadState" => "loaded", "Names" => "messagebus.service dbus.service", "SubState" => "running", "UnitFileState" => "static" }) params = Hashie::Mash.new({ "Description" => "D-Bus System Message Bus", "Id" => "dbus.service", "LoadState" => "loaded", "Names" => "messagebus.service dbus.service", "SubState" => "running", "UnitFileState" => "static", "User" => "root" })
_(resource.type).must_equal "systemd" _(resource.type).must_equal "systemd"
_(resource.name).must_equal "dbus.service" _(resource.name).must_equal "dbus.service"
_(resource.description).must_equal "D-Bus System Message Bus" _(resource.description).must_equal "D-Bus System Message Bus"