mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
Merge pull request #1111 from Anirudh-Gupta/master
fixes debian package manager and some of the code examples
This commit is contained in:
commit
28dcf11a14
4 changed files with 6 additions and 2 deletions
|
@ -9,6 +9,7 @@ module Inspec::Resources
|
|||
example "
|
||||
describe gem('rubocop') do
|
||||
it { should be_installed }
|
||||
its('version') { should eq '0.33.0' }
|
||||
end
|
||||
"
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ module Inspec::Resources
|
|||
example "
|
||||
describe oneget('zoomit') do
|
||||
it { should be_installed }
|
||||
its('version') { should eq '1.2.3' }
|
||||
end
|
||||
"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module Inspec::Resources
|
|||
name 'os'
|
||||
desc 'Use the os InSpec audit resource to test the platform on which the system is running.'
|
||||
example "
|
||||
describe os.family do
|
||||
describe os[:family] do
|
||||
it { should eq 'redhat' }
|
||||
end
|
||||
|
||||
|
|
|
@ -91,9 +91,11 @@ module Inspec::Resources
|
|||
assignment_re: /^\s*([^:]*?)\s*:\s*(.*?)\s*$/,
|
||||
multiple_values: false,
|
||||
).params
|
||||
# If the package is removed and not purged, Status is "deinstall ok config-files" with exit_status 0
|
||||
# If the package is purged cmd fails with non-zero exit status
|
||||
{
|
||||
name: params['Package'],
|
||||
installed: true,
|
||||
installed: params['Status'].split(' ').first == 'install',
|
||||
version: params['Version'],
|
||||
type: 'deb',
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue