Warn on using default with attributes

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-04-23 11:45:42 -04:00
parent aa19b6e99d
commit f7b01093a4
4 changed files with 6 additions and 4 deletions

View file

@ -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": {

View file

@ -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

View file

@ -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))

View file

@ -9,4 +9,4 @@ version: 0.1.0
attributes:
- name: val_color
type: color
default: black
value: black