CFINSPEC-85: Allow have_volume to test with container id

Signed-off-by: Sonu Saha <sonu.saha@progress.com>
This commit is contained in:
Sonu Saha 2022-03-23 23:08:29 +05:30
parent c43ef573b8
commit 20895030fa

View file

@ -99,7 +99,7 @@ module Inspec::Resources
def volume_info def volume_info
return @mount_info if defined?(@mount_info) return @mount_info if defined?(@mount_info)
@mount_info = inspec.docker.object(@opts[:name] || (!id.nil? && !opts[:id].nil? && (id == opts[:id] || id.start_with?(opts[:id])))) @mount_info = inspec.docker.object(@opts[:name] || @opts[:id])
end end
end end
end end