Skip to content

Commit

Permalink
Fix Puppet 7 unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Dec 5, 2023
1 parent a45b85e commit 87d31b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion spec/defines/conf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
require 'spec_helper'

describe 'logrotate::conf' do
_, facts = on_supported_os.first
_, facts = on_supported_os({
:supported_os => [

Check failure on line 7 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/FirstHashElementIndentation: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.

Check failure on line 7 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/HashSyntax: Use the new Ruby 1.9 hash syntax. (https://rubystyle.guide#hash-literals)
{
"operatingsystem" => "RedHat",

Check failure on line 9 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

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 9 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)
"operatingsystemrelease" => ["8"],

Check failure on line 10 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

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 10 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

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

Check failure on line 13 in spec/defines/conf_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/FirstHashElementIndentation: Indent the right brace the same as the first position after the preceding left parenthesis.
let(:facts) { facts }

shared_examples 'error raised' do |param, _os|
Expand Down
9 changes: 8 additions & 1 deletion spec/defines/rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
require 'shared_examples'

describe 'logrotate::rule' do
_, facts = on_supported_os.first
_, facts = on_supported_os({
:supported_os => [

Check failure on line 8 in spec/defines/rule_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/FirstHashElementIndentation: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.

Check failure on line 8 in spec/defines/rule_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/HashSyntax: Use the new Ruby 1.9 hash syntax. (https://rubystyle.guide#hash-literals)
{
"operatingsystem" => "RedHat",

Check failure on line 10 in spec/defines/rule_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)
"operatingsystemrelease" => ["8"],
}
]
}).first
let(:facts) { facts }

context 'ensure => absent' do
Expand Down

0 comments on commit 87d31b7

Please sign in to comment.