Skip to content

Commit a84ee70

Browse files
authored
Merge pull request #812 from tylerjl/plugin-update-pluginname
Parse plugin name when performing provider destroy
2 parents ae8e06d + 7a8995f commit a84ee70

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Support for Shield/X-Pack logging configuration file added.
77

88
#### Fixes
9+
* Fixed a bug that prevented plugins from being updated properly.
910

1011
## 5.1.1 (April 13, 2017)
1112

lib/puppet/provider/elastic_plugin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def create
140140

141141
def destroy
142142
with_environment do
143-
plugin(['remove', @resource[:name]])
143+
plugin(['remove', Puppet_X::Elastic::plugin_name(@resource[:name])])
144144
end
145145
end
146146

spec/unit/provider/elasticsearch_plugin/shared_examples.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@
124124

125125
describe 'removal' do
126126
it 'uninstalls the plugin' do
127-
provider.expects(:plugin).with(['remove', resource_name])
127+
provider.expects(:plugin).with(
128+
['remove', resource_name.split('-').last]
129+
)
128130
provider.destroy
129131
end
130132
end

0 commit comments

Comments
 (0)