mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +00:00
Warn on using default with attributes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
aa19b6e99d
commit
f7b01093a4
4 changed files with 6 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
"unknown_group_action": "ignore",
|
||||
"groups": {
|
||||
"attrs_value_replaces_default": {
|
||||
"action": "ignore",
|
||||
"action": "warn",
|
||||
"prefix": "The 'default' option for attributes is being replaced by 'value' - please use it instead."
|
||||
},
|
||||
"aws_resources_in_resource_pack": {
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'inspec check' do
|
|||
|
||||
describe 'inspec check with json formatter' do
|
||||
it 'can check a profile and produce valid JSON' do
|
||||
out = inspec('check ' + integration_test_path + ' --format json')
|
||||
out = inspec('check ' + example_profile + ' --format json')
|
||||
out.exit_status.must_equal 0
|
||||
JSON.parse(out.stdout)
|
||||
end
|
||||
|
|
|
@ -107,7 +107,9 @@ describe 'example inheritance profile' do
|
|||
out.exit_status.must_equal 0
|
||||
|
||||
out = inspec('json ' + dir + ' --output ' + dst.path)
|
||||
out.stderr.must_equal ''
|
||||
|
||||
# the profile used has 'default' style attributes
|
||||
out.stderr_ignore_deprecations.must_equal ''
|
||||
out.exit_status.must_equal 0
|
||||
|
||||
hm = JSON.load(File.read(dst.path))
|
||||
|
|
|
@ -9,4 +9,4 @@ version: 0.1.0
|
|||
attributes:
|
||||
- name: val_color
|
||||
type: color
|
||||
default: black
|
||||
value: black
|
||||
|
|
Loading…
Reference in a new issue