mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Merge pull request #1079 from chef/ssd/regression-trans-deps
Process transitive dependencies from lock file
This commit is contained in:
commit
913a8fdc40
2 changed files with 10 additions and 1 deletions
|
@ -22,7 +22,7 @@ module Inspec
|
|||
entry[:resolved_source].merge(backend: backend))
|
||||
|
||||
locked_deps = []
|
||||
Array(entry['dependencies']).each do |dep_entry|
|
||||
Array(entry[:dependencies]).each do |dep_entry|
|
||||
locked_deps << Inspec::Requirement.from_lock_entry(dep_entry, cwd, vendor_index, backend)
|
||||
end
|
||||
req.lock_deps(locked_deps)
|
||||
|
|
|
@ -173,6 +173,15 @@ Summary: \e[32m2 successful\e[0m, \e[31m0 failures\e[0m, \e[37m0 skipped\e[0m
|
|||
end
|
||||
end
|
||||
|
||||
describe "with a 2-level dependency tree" do
|
||||
it 'correctly runs tests from the whole tree' do
|
||||
out = inspec('exec ' + File.join(profile_path, 'dependencies', 'inheritance'))
|
||||
out.stderr.must_equal ''
|
||||
out.exit_status.must_equal 0
|
||||
out.stdout.force_encoding(Encoding::UTF_8).must_include "Summary: \e[32m6 successful\e[0m, \e[31m0 failures\e[0m, \e[37m0 skipped\e[0m\n"
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when using profiles on the supermarket' do
|
||||
it 'can run supermarket profiles directly from the command line' do
|
||||
out = inspec("exec supermarket://nathenharvey/tmp-compliance-profile")
|
||||
|
|
Loading…
Reference in a new issue