mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Include licensed field in PluginInfo xcontent and toString (#65830)
When #65409 was merged, it didn't include the new PluginInfo field licensed in the toString() or toXContent() outputs. This PR adds them and updates the tests accordingly.
This commit is contained in:
parent
e6935d941f
commit
dd9148de7e
3 changed files with 8 additions and 3 deletions
|
@ -154,6 +154,7 @@ public class ListPluginsCommandTests extends ESTestCase {
|
||||||
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
||||||
"Java Version: 1.8",
|
"Java Version: 1.8",
|
||||||
"Native Controller: false",
|
"Native Controller: false",
|
||||||
|
"Licensed: false",
|
||||||
"Type: isolated",
|
"Type: isolated",
|
||||||
"Extended Plugins: []",
|
"Extended Plugins: []",
|
||||||
" * Classname: org.fake"
|
" * Classname: org.fake"
|
||||||
|
@ -177,6 +178,7 @@ public class ListPluginsCommandTests extends ESTestCase {
|
||||||
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
||||||
"Java Version: 1.8",
|
"Java Version: 1.8",
|
||||||
"Native Controller: true",
|
"Native Controller: true",
|
||||||
|
"Licensed: false",
|
||||||
"Type: isolated",
|
"Type: isolated",
|
||||||
"Extended Plugins: []",
|
"Extended Plugins: []",
|
||||||
" * Classname: org.fake"
|
" * Classname: org.fake"
|
||||||
|
@ -201,6 +203,7 @@ public class ListPluginsCommandTests extends ESTestCase {
|
||||||
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
||||||
"Java Version: 1.8",
|
"Java Version: 1.8",
|
||||||
"Native Controller: false",
|
"Native Controller: false",
|
||||||
|
"Licensed: false",
|
||||||
"Type: isolated",
|
"Type: isolated",
|
||||||
"Extended Plugins: []",
|
"Extended Plugins: []",
|
||||||
" * Classname: org.fake",
|
" * Classname: org.fake",
|
||||||
|
@ -212,6 +215,7 @@ public class ListPluginsCommandTests extends ESTestCase {
|
||||||
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
"Elasticsearch Version: " + Version.CURRENT.toString(),
|
||||||
"Java Version: 1.8",
|
"Java Version: 1.8",
|
||||||
"Native Controller: false",
|
"Native Controller: false",
|
||||||
|
"Licensed: false",
|
||||||
"Type: isolated",
|
"Type: isolated",
|
||||||
"Extended Plugins: []",
|
"Extended Plugins: []",
|
||||||
" * Classname: org.fake2"
|
" * Classname: org.fake2"
|
||||||
|
|
|
@ -359,9 +359,7 @@ public class PluginInfo implements Writeable, ToXContentObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether a license must be accepted before this plugin can be installed.
|
* Whether this plugin is subject to the Elastic License.
|
||||||
*
|
|
||||||
* @return {@code true} if a license must be accepted.
|
|
||||||
*/
|
*/
|
||||||
public boolean isLicensed() {
|
public boolean isLicensed() {
|
||||||
return isLicensed;
|
return isLicensed;
|
||||||
|
@ -379,6 +377,7 @@ public class PluginInfo implements Writeable, ToXContentObject {
|
||||||
builder.field("classname", classname);
|
builder.field("classname", classname);
|
||||||
builder.field("extended_plugins", extendedPlugins);
|
builder.field("extended_plugins", extendedPlugins);
|
||||||
builder.field("has_native_controller", hasNativeController);
|
builder.field("has_native_controller", hasNativeController);
|
||||||
|
builder.field("licensed", isLicensed);
|
||||||
builder.field("type", type);
|
builder.field("type", type);
|
||||||
if (type == PluginType.BOOTSTRAP) {
|
if (type == PluginType.BOOTSTRAP) {
|
||||||
builder.field("java_opts", javaOpts);
|
builder.field("java_opts", javaOpts);
|
||||||
|
@ -422,6 +421,7 @@ public class PluginInfo implements Writeable, ToXContentObject {
|
||||||
.append(prefix).append("Elasticsearch Version: ").append(elasticsearchVersion).append("\n")
|
.append(prefix).append("Elasticsearch Version: ").append(elasticsearchVersion).append("\n")
|
||||||
.append(prefix).append("Java Version: ").append(javaVersion).append("\n")
|
.append(prefix).append("Java Version: ").append(javaVersion).append("\n")
|
||||||
.append(prefix).append("Native Controller: ").append(hasNativeController).append("\n")
|
.append(prefix).append("Native Controller: ").append(hasNativeController).append("\n")
|
||||||
|
.append(prefix).append("Licensed: ").append(isLicensed).append("\n")
|
||||||
.append(prefix).append("Type: ").append(type).append("\n");
|
.append(prefix).append("Type: ").append(type).append("\n");
|
||||||
|
|
||||||
if (type == PluginType.BOOTSTRAP) {
|
if (type == PluginType.BOOTSTRAP) {
|
||||||
|
|
|
@ -544,6 +544,7 @@ public class ClusterStatsMonitoringDocTests extends BaseMonitoringDocTestCase<Cl
|
||||||
+ " \"classname\": \"_plugin_class\","
|
+ " \"classname\": \"_plugin_class\","
|
||||||
+ " \"extended_plugins\": [],"
|
+ " \"extended_plugins\": [],"
|
||||||
+ " \"has_native_controller\": false,"
|
+ " \"has_native_controller\": false,"
|
||||||
|
+ " \"licensed\": false,"
|
||||||
+ " \"type\": \"isolated\""
|
+ " \"type\": \"isolated\""
|
||||||
+ " }"
|
+ " }"
|
||||||
+ " ],"
|
+ " ],"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue