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

Fix 'puppet resource rabbitmq_binding' and add tests (#650) #651

Merged
merged 1 commit into from
Oct 15, 2017

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Oct 13, 2017

This should fix #650. It also

  • Reformats the binding provider spec tests to be a little easier to read
  • Adds a basic test for puppet resource rabbitmq_binding in the acceptance tests. This way, we should notice if a problem comes up with this command in the future.

Since we got feedback on how to test this in the type rather than in the create method in the provider, I can try to submit a separate PR to fix this for the rabbitmq_user resource.

Some of the other providers don't have instances implemented, so won't work with puppet resource; this is a separate issue, though refactoring them would be a good project for someone with the time on their hands 😉

@wyardley wyardley added the bug Something isn't working label Oct 13, 2017
@wyardley wyardley force-pushed the fix_binding_resource branch 3 times, most recently from 03784c6 to e1f7e7e Compare October 13, 2017 22:16
@wyardley wyardley changed the title Fix (and test for) 'puppet resource rabbitmq_binding) (#650) Fix 'puppet resource rabbitmq_binding' and add tests (#650) Oct 13, 2017
@wyardley
Copy link
Contributor Author

Spot checked some resources, and these look good:

rabbitmq_queue { 'queue1@host1':
  ensure => 'present',
}
rabbitmq_queue { 'queue2@host2':
  ensure => 'present',
}
[root@centos-7-x64 ~]# puppet resource rabbitmq_plugin
rabbitmq_plugin { 'rabbitmq_federation':
  ensure => 'present',
}
rabbitmq_plugin { 'rabbitmq_federation_management':
  ensure => 'present',
}
rabbitmq_plugin { 'rabbitmq_management':
  ensure => 'present',
}

let me know if there any that aren't working for extant resources.

@wyardley
Copy link
Contributor Author

wyardley commented Oct 15, 2017

@alexjfisher @ekohl: I think this fixes it in a way that's closer to the original, thanks to @hunner's suggestion.

if !self[:source] && provider.source errored for me, but
if !self[:source] && !defined? provider.source seems to work.

I can switch the user provider to working that way again too when I get a chance.

@wyardley wyardley merged commit 0b23ad6 into voxpupuli:master Oct 15, 2017
@wyardley wyardley deleted the fix_binding_resource branch October 15, 2017 17:29
Slm0n87 pushed a commit to Slm0n87/puppet-rabbitmq that referenced this pull request Mar 7, 2019
Fix 'puppet resource rabbitmq_binding' and add tests (voxpupuli#650)
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this pull request Mar 26, 2021
Fix 'puppet resource rabbitmq_binding' and add tests (voxpupuli#650)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on using puppet resource rabbitmq_binding
2 participants