mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
26 lines
788 B
Ruby
26 lines
788 B
Ruby
|
# encoding: utf-8
|
||
|
# author: Christoph Hartmann
|
||
|
# author: Dominik Richter
|
||
|
|
||
|
require 'helper'
|
||
|
require 'inspec/resource'
|
||
|
|
||
|
describe 'Inspec::Resources::SysInfo' do
|
||
|
describe 'sys_info' do
|
||
|
it 'check ssh config parsing for Ubuntu' do
|
||
|
resource = MockLoader.new(:ubuntu1504).load_resource('sys_info')
|
||
|
_(resource.hostname).must_equal 'example.com'
|
||
|
end
|
||
|
|
||
|
it 'check ssh config parsing for Ubuntu' do
|
||
|
resource = MockLoader.new(:windows).load_resource('sys_info')
|
||
|
_(resource.hostname).must_equal 'WIN-CIV7VMLVHLD'
|
||
|
end
|
||
|
|
||
|
it 'check ssh config parsing for freebsd' do
|
||
|
resource = MockLoader.new(:freebsd10).load_resource('sys_info')
|
||
|
_(resource.hostname).must_equal 'The `sys_info.hostname` resource is not supported on your OS yet.'
|
||
|
end
|
||
|
end
|
||
|
end
|