-
-
Notifications
You must be signed in to change notification settings - Fork 269
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 Zookeeper plugin #670
Add Zookeeper plugin #670
Conversation
manifests/plugin/zookeeper.pp
Outdated
@@ -0,0 +1,14 @@ | |||
class collectd::plugin::zookeeper ( | |||
$ensure = 'present', |
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.
can you add puppet4 datatypes here?
@@ -0,0 +1,4 @@ | |||
<Plugin "zookeeper"> |
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.
could you migrate this to a epp template?
require 'spec_helper' | ||
|
||
describe 'collectd::plugin::zookeeper', type: :class do | ||
let :facts do |
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.
can you use rspec-puppet.-facts here?
I've not migrated anything to Puppet 4 as yet and I haven't spent any time on types or epp. So if someone wants to pick it up that's great otherwise I don't have the bandwidth. Sorry. |
Hi @jamtur01, thanks for the PR. I did some inline comments. Let me know if you've any questions about them. We recently dropped puppet3 support so it would be cool if all new code uses puppet4 features. |
@jamtur01 do you need this in a puppet3 environment? |
@bastelfreak Yes but I am happy to use my fork too. |
Hi @jamtur01 Can you please rebase it against latest master? |
Rebased. |
@jamtur01 sorry again, but could you rebase a final time? we fixed the spec issues in master |
Rebased again. |
\o/ |
Enum['present', 'absent'] $ensure = 'present', | ||
Optional[Integer] $interval = undef, | ||
String $zookeeper_host = 'localhost', | ||
String $zookeeper_port = '2181', |
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.
datatypes \o/
|
||
context ':ensure => absent' do | ||
let :params do | ||
{ zookeeper_host: ['myhost'], ensure: 'absent' } |
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.
How did this pass the tests. This is clearly wrong. Defined datatype is String, but this is a tuple. Strange
end | ||
|
||
it 'Will create /etc/collectd.d/10-zookeeper.conf' do | ||
is_expected.to contain_file('write_riemann.load').with(ensure: 'present') |
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.
write_riemann.load here is also wrong. no idea how this went green on travis
I fixed the broken tests in #698 |
Fixes #654.