Skip to content
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

Merged
merged 4 commits into from Oct 18, 2017
Merged

Add Zookeeper plugin #670

merged 4 commits into from Oct 18, 2017

Conversation

jamtur01
Copy link
Contributor

Fixes #654.

@@ -0,0 +1,14 @@
class collectd::plugin::zookeeper (
$ensure = 'present',
Copy link
Member

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">
Copy link
Member

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
Copy link
Member

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?

@jamtur01
Copy link
Contributor Author

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.

@bastelfreak
Copy link
Member

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.

@bastelfreak
Copy link
Member

@jamtur01 do you need this in a puppet3 environment?

@jamtur01
Copy link
Contributor Author

@bastelfreak Yes but I am happy to use my fork too.

@bastelfreak
Copy link
Member

Hi @jamtur01 Can you please rebase it against latest master?

@jamtur01
Copy link
Contributor Author

Rebased.

@bastelfreak
Copy link
Member

@jamtur01 sorry again, but could you rebase a final time? we fixed the spec issues in master

@jamtur01
Copy link
Contributor Author

Rebased again.

@bastelfreak
Copy link
Member

\o/

Enum['present', 'absent'] $ensure = 'present',
Optional[Integer] $interval = undef,
String $zookeeper_host = 'localhost',
String $zookeeper_port = '2181',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datatypes \o/

@bastelfreak bastelfreak changed the title Added Zookeeper plugin Add Zookeeper plugin Oct 18, 2017
@bastelfreak bastelfreak added enhancement New feature or request and removed needs-squash tests-fail labels Oct 18, 2017
@bastelfreak bastelfreak merged commit ec228aa into voxpupuli:master Oct 18, 2017

context ':ensure => absent' do
let :params do
{ zookeeper_host: ['myhost'], ensure: 'absent' }
Copy link
Member

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')
Copy link
Member

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

@bastelfreak
Copy link
Member

I fixed the broken tests in #698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants