mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Yum.repo should show correct name
https://github.com/chef/inspec/issues/1390 Signed-off-by: Wei, He <weihe924stephen@gmail.com>
This commit is contained in:
parent
7bee9713ad
commit
370269c2dd
2 changed files with 5 additions and 0 deletions
|
@ -134,6 +134,10 @@ module Inspec::Resources
|
|||
return false if repo.nil?
|
||||
info['status'] == 'enabled'
|
||||
end
|
||||
|
||||
def to_s
|
||||
"YumRepo #{shortname(info['id'])}"
|
||||
end
|
||||
end
|
||||
|
||||
# for compatability with serverspec
|
||||
|
|
|
@ -58,6 +58,7 @@ describe 'Inspec::Resources::YumRepo' do
|
|||
extras = resource.repo('base-debuginfo/x86_64')
|
||||
_(extras.exist?).must_equal true
|
||||
_(extras.enabled?).must_equal false
|
||||
_(extras.to_s).must_equal 'YumRepo base-debuginfo'
|
||||
end
|
||||
|
||||
it 'test enabled extra repo (serverspec backwards comptability)' do
|
||||
|
|
Loading…
Add table
Reference in a new issue