mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Add functional test to verify no-halt for undeclared inputs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
c4aa4314af
commit
4773023ef5
1 changed files with 10 additions and 0 deletions
|
@ -106,4 +106,14 @@ describe 'inputs' do
|
|||
|
||||
# # TODO - add test for backwards compatibility using 'attribute' in DSL
|
||||
end
|
||||
|
||||
describe 'when using a profile with undeclared (valueless) inputs' do
|
||||
it 'should warn about them and not abort the run' do
|
||||
cmd = "exec #{inputs_profiles_path}/undeclared"
|
||||
result = run_inspec_process(cmd, json: true)
|
||||
result.stderr.must_include "WARN: Input 'undeclared_01'"
|
||||
result.stderr.must_include 'does not have a value'
|
||||
result.must_have_all_controls_passing
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue