From c9b2dc579009f9a63c45f8399a0ab10b8e17aae2 Mon Sep 17 00:00:00 2001 From: Abhilasha Seth Date: Fri, 19 May 2023 16:21:55 +0530 Subject: [PATCH] Updated ListPluginsCommandTests Signed-off-by: Abhilasha Seth --- .../opensearch/plugins/ListPluginsCommandTests.java | 10 +++++++--- .../main/java/org/opensearch/plugins/PluginInfo.java | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java index d84f36d818046..95dd7b322adf2 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java @@ -172,7 +172,8 @@ public void testPluginWithVerbose() throws Exception { "Native Controller: false", "Extended Plugins: []", " * Classname: org.fake", - "Folder name: custom-folder" + "Folder name: custom-folder", + "SemVer Range Compatible: false" ), terminal.getOutput() ); @@ -195,7 +196,8 @@ public void testPluginWithNativeController() throws Exception { "Native Controller: true", "Extended Plugins: []", " * Classname: org.fake", - "Folder name: custom-folder" + "Folder name: custom-folder", + "SemVer Range Compatible: false" ), terminal.getOutput() ); @@ -220,6 +222,7 @@ public void testPluginWithVerboseMultiplePlugins() throws Exception { "Extended Plugins: []", " * Classname: org.fake", "Folder name: custom-folder", + "SemVer Range Compatible: false", "fake_plugin2", "- Plugin information:", "Name: fake_plugin2", @@ -230,7 +233,8 @@ public void testPluginWithVerboseMultiplePlugins() throws Exception { "Native Controller: false", "Extended Plugins: []", " * Classname: org.fake2", - "Folder name: custom-folder" + "Folder name: custom-folder", + "SemVer Range Compatible: false" ), terminal.getOutput() ); diff --git a/server/src/main/java/org/opensearch/plugins/PluginInfo.java b/server/src/main/java/org/opensearch/plugins/PluginInfo.java index 36f27e120bae6..f0bf3e547e1c3 100644 --- a/server/src/main/java/org/opensearch/plugins/PluginInfo.java +++ b/server/src/main/java/org/opensearch/plugins/PluginInfo.java @@ -252,7 +252,6 @@ public static PluginInfo readFromProperties(final Path path) throws IOException final String isSemVerRangeCompatibleValue = propsMap.remove("is.semVer.range.compatible"); final boolean isSemVerRangeCompatible = getBooleanProperty("is.semVer.range.compatible", isSemVerRangeCompatibleValue, false); - ; if (propsMap.isEmpty() == false) { throw new IllegalArgumentException("Unknown properties in plugin descriptor: " + propsMap.keySet());