diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-16 11:43:33 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-07-16 11:43:33 -0700 |
commit | 12297e33541ef53bbc27dfdfac44aaa55972f8d1 (patch) | |
tree | 2411161f7e9510f4c968386c2551ea02d09ff115 /spec | |
parent | 2898a684eb85fcec5325390cfec7f57f6a2e4b8c (diff) | |
download | chef-12297e33541ef53bbc27dfdfac44aaa55972f8d1.tar.gz |
Simplify platform detection in the group functional specs
We're trying to catch everything linux here. Just catch that.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/group_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/functional/resource/group_spec.rb b/spec/functional/resource/group_spec.rb index cb11a8b288..dc5197f5d8 100644 --- a/spec/functional/resource/group_spec.rb +++ b/spec/functional/resource/group_spec.rb @@ -1,7 +1,7 @@ # # Author:: Chirag Jog (<chirag@clogeny.com>) # Author:: Siddheshwar More (<siddheshwar.more@clogeny.com>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2018, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,8 +25,8 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do include Chef::Mixin::ShellOut def group_should_exist(group) - case ohai[:platform_family] - when "debian", "fedora", "rhel", "suse", "gentoo", "slackware", "arch" + case ohai[:os] + when "linux" expect { Etc.getgrnam(group) }.not_to raise_error expect(group).to eq(Etc.getgrnam(group).name) when "windows" @@ -50,8 +50,8 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do end def group_should_not_exist(group) - case ohai[:platform_family] - when "debian", "fedora", "rhel", "suse", "gentoo", "slackware", "arch" + case ohai[:os] + when "linux" expect { Etc.getgrnam(group) }.to raise_error(ArgumentError, "can't find group for #{group}") when "windows" expect { Chef::Util::Windows::NetGroup.new(group).local_get_members }.to raise_error(ArgumentError, /The group name could not be found./) |