Browse Source

plugin -remove deletes bin directory
Adding test for #3847.

David Pilato 12 years ago
parent
commit
88a2f54dfe
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/test/java/org/elasticsearch/plugin/PluginManagerTests.java

+ 7 - 0
src/test/java/org/elasticsearch/plugin/PluginManagerTests.java

@@ -18,6 +18,7 @@
 
 package org.elasticsearch.plugin;
 
+import org.elasticsearch.ElasticSearchIllegalArgumentException;
 import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
 import org.elasticsearch.common.collect.Tuple;
 import org.elasticsearch.common.io.FileSystemUtils;
@@ -184,4 +185,10 @@ public class PluginManagerTests extends AbstractIntegrationTest {
         // We want to remove plugin with groupid/artifactid form
         singlePluginInstallAndRemove("groupid/plugintest", "file://".concat(PluginManagerTests.class.getResource("plugin_without_folders.zip").getFile()));
     }
+
+    @Test(expected = ElasticSearchIllegalArgumentException.class)
+    public void testRemovePluginWithURLForm() throws Exception {
+        PluginManager pluginManager = pluginManager(null);
+        pluginManager.removePlugin("file://whatever");
+    }
 }