diff options
author | Joshua Miller <joshuamiller01@gmail.com> | 2016-08-26 09:54:38 -0700 |
---|---|---|
committer | Phil Dibowitz <phil@ipom.com> | 2016-08-26 09:54:38 -0700 |
commit | 3f33d7a105801c31ae7a38334e582068ea94af2b (patch) | |
tree | 1711b52a9189401bcebb0de4d19235c245d0d41d /spec/unit/provider/service | |
parent | bf7c0f9a698616da9c68adf6c0ca81f27456dc9d (diff) | |
download | chef-3f33d7a105801c31ae7a38334e582068ea94af2b.tar.gz |
Use symbols instead of strings as keys for systemd user property (#5241)
* Use symbols instead of strings as keys for systemd user property related funcs
* Fix tests for provider/service/systemd for when user property is set
* Change hash in systemctl_opts to use symbols instead of strings
* Fix tests for chef/provider/systemd_unit.rb
Diffstat (limited to 'spec/unit/provider/service')
-rw-r--r-- | spec/unit/provider/service/systemd_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb index 8574cbf772..4e25f499f6 100644 --- a/spec/unit/provider/service/systemd_service_spec.rb +++ b/spec/unit/provider/service/systemd_service_spec.rb @@ -196,14 +196,14 @@ describe Chef::Provider::Service::Systemd do context "when a user is specified" do it "should call '#{systemctl_path} --user start service_name' if no start command is specified" do current_resource.user("joe") - expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" }).and_return(shell_out_success) + expect(provider).to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { :environment => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, :user => "joe" }).and_return(shell_out_success) provider.start_service end it "should not call '#{systemctl_path} --user start service_name' if it is already running" do current_resource.running(true) current_resource.user("joe") - expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { "environment" => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, "user" => "joe" }) + expect(provider).not_to receive(:shell_out_with_systems_locale!).with("#{systemctl_path} --user start #{service_name}", { :environment => { "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/10000/bus" }, :user => "joe" }) provider.start_service end end |