Add test for plugin install heuristic
This commit is contained in:
parent
6db323164e
commit
1ecf14cee0
|
@ -134,9 +134,6 @@ class InstallPluginCommand extends SettingCommand {
|
|||
}
|
||||
}
|
||||
|
||||
// protocols allowed for direct url installation
|
||||
private static final List<String> URL_PROTOCOLS = Arrays.asList("http", "https", "file");
|
||||
|
||||
private final OptionSpec<Void> batchOption;
|
||||
private final OptionSpec<String> arguments;
|
||||
|
||||
|
|
|
@ -307,6 +307,12 @@ public class InstallPluginCommandTests extends ESTestCase {
|
|||
assertTrue(e.getMessage(), e.getMessage().contains("no protocol"));
|
||||
}
|
||||
|
||||
public void testUnknownPlugin() throws Exception {
|
||||
Tuple<Path, Environment> env = createEnv(fs, temp);
|
||||
UserError e = expectThrows(UserError.class, () -> installPlugin("foo", env.v1()));
|
||||
assertTrue(e.getMessage(), e.getMessage().contains("Unknown plugin foo"));
|
||||
}
|
||||
|
||||
public void testPluginsDirMissing() throws Exception {
|
||||
Tuple<Path, Environment> env = createEnv(fs, temp);
|
||||
Files.delete(env.v2().pluginsFile());
|
||||
|
|
Loading…
Reference in New Issue