-
Notifications
You must be signed in to change notification settings - Fork 289
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
(GH-578) etc_dir should be configurable #741
Conversation
spec/spec_helper.rb
Outdated
@@ -26,5 +26,6 @@ | |||
:ipaddress => '127.0.0.1', | |||
:kernel => 'Linux', | |||
:osfamily => 'RedHat', | |||
:fqdn => 'testfqdn', |
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.
your fqdn isnt fully qualified, perhaps testfqdn.example.com
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.
fixed
Wow, this small parameter does touch a lot of resources. The sensu::check class does not source in $etc_dir from sensu main class. It does use it's own (same) default values. Should I change sensu::check to also source values from main class ? |
will rebase |
rebased & ready for review |
manifests/init.pp
Outdated
# String. Absolute path to the sensu etc directory. | ||
# Default: '/etc/sensu' on RedHat and Debian | ||
# 'C:/opt/sensu' on windows | ||
# undef on all other platforms |
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.
what happens if this is undef? Maybe the default should be /etc/sensu
?
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.
That would make sense in most cases I guess.
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.
changed the behaviour to default to '/etc/sensu'
@tuxmea Let's add support for new OSfamilies in specific PRs/commits. Guess it needs more work than this. |
@@ -30,6 +136,106 @@ | |||
} | |||
end | |||
|
|||
# FIXME: The following resource checks are only testing $sensu_etc_dir specific values |
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.
what else should they test?
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.
These tests only checks for the $sensu_etc_dir specific details. They don't test the other file resource details that should be tested as well. Eg:
it do
should contain_file('C:/opt/sensu/bin/sensu-client.xml').with({
'ensure' => 'file',
'content' => content,
... and other parameters....
})
end
There is still a lot of test to add for all the managed resources and functionality. But this is out of scope for this PR.
will rebase |
rebased |
Sorry to ask you to rebase again, though we've implemented data types and all PR's will need to be rebased. |
et voilà, rebased for a good thing ;) |
Solves #578 |
Thank you! Released in v2.28.0 |
No description provided.