-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Puppet v4's data types #682
Comments
|
I can tackle this one. |
|
We want to maintain support for 4.9. Check out the platform list in |
Converted init.pp
Converted contact.pp
Converted extension.pp
Converted filter.pp
Converted handler.pp
Converted plugin.pp
Converted plugins_dir.pp
Converted subscription.pp
Converted plugins_dir.pp
Converted subscription.pp
Converted check.pp
Added other minor classes
Added missed conversions
Chasing spec tests: client_port and windows
Fix for:
Puppet::PreformattedError:
Evaluation Error: Error while evaluating a Resource Statement, Class[Sensu]:
parameter 'client_port' expects an Integer value, got String
parameter 'windows_log_number' expects an Integer value, got String at line 1:1 on node testing-docker-ac071449-363b-497c-8ac8-216c94bab189.ec2.internal
Chasing specs: An approach to Integers as strings
Chasing specs: More allowed integers as strings
Quick approach to unmatching error messages
Chasing specs one after one
Chasing specs, almost there
Readded check on command precence on sensu::check
Test old messages. Spec failures expected.
Added stardard Puppet::PreformattedError messages
With the current test structure it's not possible to add test messages
for all the combinations. Check for errors in
https://travis-ci.org/sensu/sensu-puppet/jobs/254349761
26) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid {"ha"=>"sh"} (as Hash) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...'], got Struct at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
27) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid 3 (as Fixnum) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...], got Integer at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
28) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid 2.42 (as Float) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...n'], got Float at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
and so on. For each sample entry a different massage, according to its
data type.
Soe cosmetic alignments
Lint
Fixed regexps broken by mass f/r
Remove another rogue space
Converted init.pp
Converted contact.pp
Converted extension.pp
Converted filter.pp
Converted handler.pp
Converted plugin.pp
Converted plugins_dir.pp
Converted subscription.pp
Converted plugins_dir.pp
Converted subscription.pp
Converted check.pp
Added other minor classes
Added missed conversions
Chasing spec tests: client_port and windows
Fix for:
Puppet::PreformattedError:
Evaluation Error: Error while evaluating a Resource Statement, Class[Sensu]:
parameter 'client_port' expects an Integer value, got String
parameter 'windows_log_number' expects an Integer value, got String at line 1:1 on node testing-docker-ac071449-363b-497c-8ac8-216c94bab189.ec2.internal
Chasing specs: An approach to Integers as strings
Chasing specs: More allowed integers as strings
Quick approach to unmatching error messages
Chasing specs one after one
Chasing specs, almost there
Readded check on command precence on sensu::check
Test old messages. Spec failures expected.
Added stardard Puppet::PreformattedError messages
With the current test structure it's not possible to add test messages
for all the combinations. Check for errors in
https://travis-ci.org/sensu/sensu-puppet/jobs/254349761
26) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid {"ha"=>"sh"} (as Hash) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...'], got Struct at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
27) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid 3 (as Fixnum) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...], got Integer at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
28) sensu variable type and content validations when log_level (validate_re log_level) is set to invalid 2.42 (as Float) should fail
Failure/Error: expect { should contain_class(subject) }.to raise_error(Puppet::PreformattedError, /#{var[:message]}/)
expected Puppet::PreformattedError with message matching /validate_re()/, got #<Puppet::PreformattedError: Evaluation Error: Error while evaluating a Resource Statement, Class[Sen...n'], got Float at line 1:1 on node testing-docker-890e06b4-758a-456f-9b4c-71d753fe62dd.ec2.internal> with backtrace:
and so on. For each sample entry a different massage, according to its
data type.
Soe cosmetic alignments
Lint
Fixed regexps broken by mass f/r
Remove another rogue space
Fixed path validation
Without this patch, the following warning is issued. Warning: This method is deprecated, please use match expressions with Stdlib::Compat::Bool instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions. at ["/etc/puppetlabs/code/environments/production/modules/sensu/manifests/init.pp", 615]:
|
Testing against all vagrant instances and making additions in PR #761 |
Without this patch, the following warning is issued. Warning: This method is deprecated, please use match expressions with Stdlib::Compat::Bool instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions. at ["/etc/puppetlabs/code/environments/production/modules/sensu/manifests/init.pp", 615]:
|
Released in v2.26.0 |
This will get rid of the deprecation notices and allow us to use the improvement in Puppet v4.
https://docs.puppet.com/puppet/4.10/lang_data_type.html
The text was updated successfully, but these errors were encountered: