Skip to content

Commit

Permalink
add test to not detect modern facts
Browse files Browse the repository at this point in the history
  • Loading branch information
alex501212 committed Feb 19, 2025
1 parent 2f657fb commit afa8b38
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@
end
end

context "with YAML string not containing legacy fact" do

Check failure on line 146 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.2) / spec

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)

Check failure on line 146 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 2.7) / spec

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)

Check failure on line 146 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.3) / spec

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)
let(:code) { 'some_key: "%{facts.os.name}"' }

Check failure on line 148 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.2) / spec

Layout/TrailingWhitespace: Trailing whitespace detected. (https://rubystyle.guide#no-trailing-whitespace)

Check failure on line 148 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 2.7) / spec

Layout/TrailingWhitespace: Trailing whitespace detected. (https://rubystyle.guide#no-trailing-whitespace)

Check failure on line 148 in spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb

View workflow job for this annotation

GitHub Actions / spec (ruby 3.3) / spec

Layout/TrailingWhitespace: Trailing whitespace detected. (https://rubystyle.guide#no-trailing-whitespace)
it 'does not detect any problems' do
expect(problems).to be_empty
end
end

context 'with YAML nested structure containing legacy fact' do
let(:code) { "nested:\n value: \"%{::architecture}\"" }

Expand Down

0 comments on commit afa8b38

Please sign in to comment.