Sha256: fabf9b07d54c208e49bc3191dabb8e39d57ec2c79c7f3679b49d41791b7601d5

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 KB

Contents

# encoding: utf-8

if os.windows?

  describe registry_key('HKLM\System\Test') do
    it { should exist }
    it { should have_value('test') }
    it { should have_property('binary value', :binary) }
    it { should have_property('string value') }
    it { should have_property('dword value', :dword) }
    it { should have_property_value('multistring value', :multi_string, ['test', 'multi','string','data']) }
    it { should have_property_value('qword value', :qword, 0) }
    it { should have_property_value('binary value', :binary, 'dfa0f066') }
  end

  # serverspec compatability
  describe windows_registry_key('HKLM\System\Test') do
    it { should exist }
    it { should have_value('test') }
    it { should have_property('string value') }
    it { should have_property('binary value', :type_binary) }
    it { should have_property('dword value', :type_dword) }
    it { should have_property_value('multistring value', :type_multistring, ['test', 'multi','string','data']) }
    it { should have_property_value('qword value', :type_qword, 0) }
    it { should have_property_value('binary value', :type_binary, 'dfa0f066') }
  end

  describe registry_key('HKLM\Software\Policies\Microsoft\Windows\EventLog\System') do
    it { should exist }
    its('MaxSize') { should_not eq nil }
  end

  describe registry_key('HKLM\System\CurrentControlSet\Control\Session Manager') do
    it { should exist }
    it { should_not have_property_value('SafeDllSearchMode', :type_dword, 0) }
  end

  describe registry_key('HKLM\System\CurrentControlSet\Services\LanManServer\Parameters') do
    it { should exist }
    its('NullSessionShares') { should eq [''] }
  end

  describe registry_key('HKLM\Software\Policies\Microsoft\Internet Explorer\Main') do
    it { should exist }
    its('Isolation64Bit') { should eq 1 }
  end

  describe registry_key('HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services') do
    it { should exist }
    its('MinEncryptionLevel') { should eq 3 }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inspec-0.9.3 test/integration/test/integration/default/registry_key_spec.rb