diff options
-rw-r--r-- | lib/chef/platform/provider_mapping.rb | 3 | ||||
-rw-r--r-- | spec/unit/platform_spec.rb | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/chef/platform/provider_mapping.rb b/lib/chef/platform/provider_mapping.rb index 0766ccffa7..a812dcd7ad 100644 --- a/lib/chef/platform/provider_mapping.rb +++ b/lib/chef/platform/provider_mapping.rb @@ -200,6 +200,9 @@ class Chef :service => Chef::Provider::Service::Redhat, :cron => Chef::Provider::Cron, :package => Chef::Provider::Package::Zypper, + :group => Chef::Provider::Group::Gpasswd + }, + "< 12.0" => { :group => Chef::Provider::Group::Suse } }, diff --git a/spec/unit/platform_spec.rb b/spec/unit/platform_spec.rb index 029fc29aae..e8c41cdd77 100644 --- a/spec/unit/platform_spec.rb +++ b/spec/unit/platform_spec.rb @@ -278,6 +278,17 @@ describe Chef::Platform do pmap[:package].should eql(Chef::Provider::Package::Ips) end + it "should use the SUSE group provider on SLES11" do + 1.upto(3) do |sp| + pmap = Chef::Platform.find("SUSE", "11.#{sp}") + pmap[:group].should eql(Chef::Provider::Group::Suse) + end + end + + it "should use the Gpasswd group provider on SLES12" do + pmap = Chef::Platform.find("SUSE", "12.0") + pmap[:group].should eql(Chef::Provider::Group::Gpasswd) + end end end |