Skip to content

Commit

Permalink
Merge pull request #812 from tylerjl/plugin-update-pluginname
Browse files Browse the repository at this point in the history
Parse plugin name when performing provider destroy
  • Loading branch information
tylerjl authored Apr 25, 2017
2 parents ae8e06d + 7a8995f commit a84ee70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Support for Shield/X-Pack logging configuration file added.

#### Fixes
* Fixed a bug that prevented plugins from being updated properly.

## 5.1.1 (April 13, 2017)

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/elastic_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def create

def destroy
with_environment do
plugin(['remove', @resource[:name]])
plugin(['remove', Puppet_X::Elastic::plugin_name(@resource[:name])])
end
end

Expand Down
4 changes: 3 additions & 1 deletion spec/unit/provider/elasticsearch_plugin/shared_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@

describe 'removal' do
it 'uninstalls the plugin' do
provider.expects(:plugin).with(['remove', resource_name])
provider.expects(:plugin).with(
['remove', resource_name.split('-').last]
)
provider.destroy
end
end
Expand Down

0 comments on commit a84ee70

Please sign in to comment.