summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-10 23:34:25 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-10 23:34:25 -0700
commit0cbe1b778df3b6e10b7e7552d3b0699c843465ce (patch)
tree93c685c38943b80e468235d5d324338847510cb4
parented9fdcb3e1f0e40f88f74a538c64981c29d74b66 (diff)
parentb5a9bfd10ad06311c1a8d0f4c296378bb9103978 (diff)
downloadchef-0cbe1b778df3b6e10b7e7552d3b0699c843465ce.tar.gz
Merge pull request #2211 from opscode/sersut/rebase-chef-2187
Rebase CHEF-2187: change default group mapping for SLES to gpasswd
-rw-r--r--lib/chef/platform/provider_mapping.rb3
-rw-r--r--spec/unit/platform_spec.rb16
2 files changed, 16 insertions, 3 deletions
diff --git a/lib/chef/platform/provider_mapping.rb b/lib/chef/platform/provider_mapping.rb
index 6f5cde87ca..9e15ea5658 100644
--- a/lib/chef/platform/provider_mapping.rb
+++ b/lib/chef/platform/provider_mapping.rb
@@ -200,9 +200,10 @@ class Chef
:service => Chef::Provider::Service::Systemd,
:cron => Chef::Provider::Cron,
:package => Chef::Provider::Package::Zypper,
- :group => Chef::Provider::Group::Suse
+ :group => Chef::Provider::Group::Gpasswd
},
"< 12.0" => {
+ :group => Chef::Provider::Group::Suse,
:service => Chef::Provider::Service::Redhat
}
},
diff --git a/spec/unit/platform_spec.rb b/spec/unit/platform_spec.rb
index 5b880dc0cf..9a65cbe878 100644
--- a/spec/unit/platform_spec.rb
+++ b/spec/unit/platform_spec.rb
@@ -286,8 +286,20 @@ describe Chef::Platform do
end
it "should use the Systemd service provider on SLES12" do
- pmap = Chef::Platform.find("SUSE", "12.0")
- pmap[:service].should eql(Chef::Provider::Service::Systemd)
+ pmap = Chef::Platform.find("SUSE", "12.0")
+ pmap[:service].should eql(Chef::Provider::Service::Systemd)
+ 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