summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-10 16:02:48 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-10 16:06:48 -0700
commitb5a9bfd10ad06311c1a8d0f4c296378bb9103978 (patch)
treed1599004cce73e3d6377279ad677753644659448
parent0fb570467abd6bc19871fa0373d0201c1432ecc5 (diff)
parent95e1182b41aaf083b099d0fb251552f9f4691cf0 (diff)
downloadchef-sersut/rebase-chef-2187.tar.gz
Merge branch 'suse-group' of github.com:mapleoin/chefsersut/rebase-chef-2187
Conflicts: spec/unit/platform_spec.rb
-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