diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-13 07:40:48 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-13 07:40:48 -0800 |
commit | e038fb65f749448db2fa911391ac9de768dc2578 (patch) | |
tree | c02dd3083b931b91a94affa74941cfae93d48f1d /spec/unit | |
parent | 5e5cbe6df61ae69b9a5942ce51a7ad1f8bb6ea3a (diff) | |
download | chef-e038fb65f749448db2fa911391ac9de768dc2578.tar.gz |
fix Lint/DuplicatedKeylcg/duplicated-keys
so, this is a bit special...
the API for "priority" is clearly broken. but this broken API comes
from the service resource itself which appears to have been broken
by design since at least 2010.
just fixing the code for how it behaves and dropping in FIXMEs
for now, since this uncovered a fairly massive API-breaking yak.
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/provider/service/aixinit_service_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/unit/provider/service/aixinit_service_spec.rb b/spec/unit/provider/service/aixinit_service_spec.rb index e4c9faa8b4..9977343daa 100644 --- a/spec/unit/provider/service/aixinit_service_spec.rb +++ b/spec/unit/provider/service/aixinit_service_spec.rb @@ -208,7 +208,9 @@ describe Chef::Provider::Service::AixInit do context "when rc2.d contains both start and stop scripts" do before do @files = ["/etc/rc.d/rc2.d/S20apache", "/etc/rc.d/rc2.d/K80apache"] - @priority = {2 => [:start, 20], 2 => [:stop, 80]} + # FIXME: this is clearly buggy the duplicated keys do not work + #@priority = {2 => [:start, 20], 2 => [:stop, 80]} + @priority = {2 => [:stop, 80]} allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]chef"]).and_return(@files) end @@ -253,7 +255,9 @@ describe Chef::Provider::Service::AixInit do context "when rc2.d contains both start and stop scripts" do before do files = ["/etc/rc.d/rc2.d/Sapache", "/etc/rc.d/rc2.d/Kapache"] - @priority = {2 => [:start, ''], 2 => [:stop, '']} + # FIXME: this is clearly buggy the duplicated keys do not work + #@priority = {2 => [:start, ''], 2 => [:stop, '']} + @priority = {2 => [:stop, '']} allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]#{@new_resource.service_name}"]).and_return(files) end @@ -266,4 +270,3 @@ describe Chef::Provider::Service::AixInit do end end end - |