-
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
add field ttl_status to sensu_check (cont) #1000
Conversation
spec/unit/sensu_check_spec.rb
Outdated
| describe 'ttl_status parameter' do | ||
| subject { described_class.new(resource_hash)[:ttl_status] } | ||
|
|
||
| valid = [1, 0, '1', '0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'absent' is also valid and so is undef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data type:
Variant[Undef,Enum['absent'],Integer]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'1' and '0' should not work since they are not integers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They work because the type property munges with to_i if not absent. The validation in type takes place before munge. The data type isn't actually tested yet, should the behavior of type property match data type or should data type be updated to allow numeric strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the data type should be updated to allow for stringified integers by using a regex.
|
Added pattern to datatype and tests for the |
REFERENCE.md
Outdated
| @@ -1914,6 +1914,15 @@ considered stale. Set this to 'absent' to remove it completely. | |||
|
|
|||
| Default value: `undef` | |||
|
|
|||
| ##### `ttl_status` | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run rake reference to re-generate this as the data type in the docs does not match the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can remove the file from the commit and it will get regenerated as part of the release process.
Co-authored-by: asiek191 <witkows@gmail.com> Co-authored-by: Trey Dockendorf <treydock@gmail.com>
|
Removed change to REFERENCE.md and squashed all commits into one. |
|
Released in v2.57.0 |
This is a continuation of #927 with unit tests added for new
ttl_statusproperty.