diff options
author | danielsdeleo <dan@opscode.com> | 2013-07-17 12:07:42 -0700 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2013-08-19 11:52:44 -0700 |
commit | 4c3f98f72b622119246aa173d7cd04519dad0087 (patch) | |
tree | 8d9d459ca3f569a7d4b769e6692410a5c97957ec /spec | |
parent | 4921379e765cb7152fa06fd4f5aff47fa9ed9158 (diff) | |
download | ohai-4c3f98f72b622119246aa173d7cd04519dad0087.tar.gz |
Disable root_group on Windows
Fixes OHAI-490: http://tickets.opscode.com/browse/OHAI-490
Implementation of root_group for windows has been found to have poor
performance when the host is joined to an AD domain. Opting to disable
on Windows since large changes will be required for a performant
implementation.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/plugins/root_group_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/unit/plugins/root_group_spec.rb b/spec/unit/plugins/root_group_spec.rb index 0fee6fe4..501264f2 100644 --- a/spec/unit/plugins/root_group_spec.rb +++ b/spec/unit/plugins/root_group_spec.rb @@ -81,54 +81,12 @@ describe Ohai::System, 'root_group' do end describe 'windows', :windows_only do - before(:each) do - ::RbConfig::CONFIG['host_os'] = 'windows' - - # fake out WMI::Win32_Group#find - unless defined?(WMI) - module WMI - unless defined?(WMI::Win32_Group) - class Win32_Group; end - end - end - end - @group = Object.new - WMI::Win32_Group. - stub(:find). - with(:first, :conditions => {:SID => 'S-1-5-32-544'}). - and_return(@group) - end # TODO: Not implemented on windows. # See also: # # http://tickets.opscode.com/browse/OHAI-490 # http://tickets.opscode.com/browse/OHAI-491 - describe 'with administrator group' do - before(:each) do - @group. - stub(:[]). - with('Name'). - and_return('Administrator') - end - it 'should have a root_group of system' do - @plugin.run - @plugin[:root_group].should == 'Administrator' - end - end - - describe 'with renamed administrator group' do - before(:each) do - @group. - stub(:[]). - with('Name'). - and_return('BOFH') - end - it 'should have a root_group of system' do - @plugin.run - @plugin[:root_group].should == 'BOFH' - end - end end end |