forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request redhat-openstack#292 from bogdando/fix3_MODULES_1452
Make rabbitmq providers to retry the commands
- Loading branch information
Showing
10 changed files
with
98 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
spec/unit/puppet/provider/rabbitmq_plugin/rabbitmqctl_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'puppet' | ||
require 'mocha' | ||
RSpec.configure do |config| | ||
config.mock_with :mocha | ||
end | ||
provider_class = Puppet::Type.type(:rabbitmq_plugin).provider(:rabbitmqplugins) | ||
describe provider_class do | ||
before :each do | ||
@resource = Puppet::Type::Rabbitmq_plugin.new( | ||
{:name => 'foo'} | ||
) | ||
@provider = provider_class.new(@resource) | ||
end | ||
it 'should match plugins' do | ||
@provider.expects(:rabbitmqplugins).with('list', '-E', '-m').returns("foo\n") | ||
@provider.exists?.should == 'foo' | ||
end | ||
it 'should call rabbitmqplugins to enable' do | ||
@provider.expects(:rabbitmqplugins).with('enable', 'foo') | ||
@provider.create | ||
end | ||
it 'should call rabbitmqplugins to disable' do | ||
@provider.expects(:rabbitmqplugins).with('disable', 'foo') | ||
@provider.destroy | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters