diff options
author | siddheshwar-more <siddheshwar.more@clogeny.com> | 2013-07-22 16:45:26 +0530 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-09-03 15:19:04 -0700 |
commit | 415a550eedbc708e52368ab80f715dbd73c1bf55 (patch) | |
tree | f1c389a76eeb9c82349e207b1a43cedd05f31e51 /spec | |
parent | 35e466bbf265568ff83432d01ab81fdad3f1e248 (diff) | |
download | chef-415a550eedbc708e52368ab80f715dbd73c1bf55.tar.gz |
Updated group resource functional tests to use ohai platform_family insted of ohai platform
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/group_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb index 96de671eb6..e9e72a2c8c 100644 --- a/spec/functional/resource/group_spec.rb +++ b/spec/functional/resource/group_spec.rb @@ -5,8 +5,8 @@ require 'functional/resource/base' describe Chef::Resource::Group do def group_should_exist(resource) - case @OHAI_SYSTEM[:platform] - when "ubuntu", "linux" + case @OHAI_SYSTEM[:platform_family] + when "debian", "fedora", "rhel", "suse", "gentoo", "slackware", "arch" expect { Etc::getgrnam(resource.name) }.to_not raise_error(ArgumentError, "can't find group for #{resource.name}") expect(resource.name).to eq(Etc::getgrnam(resource.name).name) when "windows" @@ -15,8 +15,8 @@ describe Chef::Resource::Group do end def user_exist_in_group?(resource, user) - case @OHAI_SYSTEM[:platform] - when "ubuntu", "linux" + case @OHAI_SYSTEM[:platform_family] + when "debian", "fedora", "rhel", "suse", "gentoo", "slackware", "arch" Etc::getgrnam(resource.name).mem.include?(user) when "windows" Chef::Util::Windows::NetGroup.new(resource.group_name).local_get_members.include?(user) @@ -24,8 +24,8 @@ describe Chef::Resource::Group do end def group_should_not_exist(resource) - case @OHAI_SYSTEM[:platform] - when "ubuntu", "linux" + case @OHAI_SYSTEM[:platform_family] + when "debian", "fedora", "rhel", "suse", "gentoo", "slackware", "arch" expect { Etc::getgrnam(resource.name) }.to raise_error(ArgumentError, "can't find group for #{resource.name}") when "windows" expect { Chef::Util::Windows::NetGroup.new(resource.group_name).local_get_members }.to raise_error(ArgumentError, "The group name could not be found.") |