diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bdbbf18..5d8fd70 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -86,7 +86,7 @@ RSpec/DescribedClass: # Offense count: 7 # Configuration parameters: CountAsOne. RSpec/ExampleLength: - Max: 16 + Max: 17 # Offense count: 4 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. @@ -100,7 +100,7 @@ RSpec/FilePath: # Offense count: 29 RSpec/MultipleExpectations: - Max: 10 + Max: 11 # Offense count: 30 # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. diff --git a/spec/fixtures/hiera/hiera_badkey.yaml b/spec/fixtures/hiera/hiera_badkey.yaml index 9e81278..38449a3 100644 --- a/spec/fixtures/hiera/hiera_badkey.yaml +++ b/spec/fixtures/hiera/hiera_badkey.yaml @@ -3,6 +3,7 @@ this_is_ok: 0 this_is_ok::too: 0 th1s_is_ok::two3: 0 :eventhis: 0 +this_is_ok::concat_func: "%{lookup('foo')}%{lookup('bar')}" typical:typo::warning1: true ::notsotypical::warning2: true @@ -15,3 +16,4 @@ this_is::warning7: - "%{lookup('foobar'):3306}" this_is::warning8: foo: "%{lookup('foobar'):3306}" +this_is::warning9: "%{lookup('foo'):3306}%{lookup('bar')}" diff --git a/spec/puppet-syntax/hiera_spec.rb b/spec/puppet-syntax/hiera_spec.rb index 1436fbc..91fc4ad 100644 --- a/spec/puppet-syntax/hiera_spec.rb +++ b/spec/puppet-syntax/hiera_spec.rb @@ -29,7 +29,7 @@ it 'returns warnings for invalid keys' do hiera_yaml = 'hiera_badkey.yaml' - examples = 8 + examples = 9 files = fixture_hiera(hiera_yaml) res = subject.check(files) (1..examples).each do |n| @@ -44,6 +44,7 @@ expect(res[5]).to match('Key :this_is::warning6: string after a function call but before `}` in the value') expect(res[6]).to match('Key :this_is::warning7: string after a function call but before `}` in the value') expect(res[7]).to match('Key :this_is::warning8: string after a function call but before `}` in the value') + expect(res[8]).to match('Key :this_is::warning9: string after a function call but before `}` in the value') end it 'returns warnings for bad eyaml values' do