diff --git a/elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java
index a578d3949b3..56588f680f7 100644
--- a/elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java
+++ b/elasticsearch/src/main/java/org/elasticsearch/license/XPackLicenseState.java
@@ -285,6 +285,7 @@ public class XPackLicenseState {
*
* Watcher is available if the license is active (hasn't expired) and of one of the following types:
*
+ * - {@link OperationMode#STANDARD}
* - {@link OperationMode#PLATINUM}
* - {@link OperationMode#GOLD}
* - {@link OperationMode#TRIAL}
@@ -304,6 +305,7 @@ public class XPackLicenseState {
case TRIAL:
case GOLD:
case PLATINUM:
+ case STANDARD:
return true;
default:
return false;
diff --git a/elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java b/elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java
index c201f2f2aa4..d0ee3c03923 100644
--- a/elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java
+++ b/elasticsearch/src/test/java/org/elasticsearch/license/XPackLicenseStateTests.java
@@ -208,26 +208,34 @@ public class XPackLicenseStateTests extends ESTestCase {
}
public void testMonitoringUpdateRetention() {
- OperationMode mode = randomFrom(STANDARD, GOLD, PLATINUM, TRIAL);
- assertAllowed(mode, true, XPackLicenseState::isUpdateRetentionAllowed, true);
+ assertAllowed(STANDARD, true, XPackLicenseState::isUpdateRetentionAllowed, true);
+ assertAllowed(GOLD, true, XPackLicenseState::isUpdateRetentionAllowed, true);
+ assertAllowed(PLATINUM, true, XPackLicenseState::isUpdateRetentionAllowed, true);
+ assertAllowed(TRIAL, true, XPackLicenseState::isUpdateRetentionAllowed, true);
assertAllowed(BASIC, true, XPackLicenseState::isUpdateRetentionAllowed, false);
assertAllowed(MISSING, false, XPackLicenseState::isUpdateRetentionAllowed, false);
}
- public void testWatcherPlatinumGoldTrial() throws Exception {
- assertAllowed(randomFrom(TRIAL, GOLD, PLATINUM), true, XPackLicenseState::isWatcherAllowed, true);
+ public void testWatcherPlatinumGoldTrialStandard() throws Exception {
+ assertAllowed(TRIAL, true, XPackLicenseState::isWatcherAllowed, true);
+ assertAllowed(GOLD, true, XPackLicenseState::isWatcherAllowed, true);
+ assertAllowed(PLATINUM, true, XPackLicenseState::isWatcherAllowed, true);
+ assertAllowed(STANDARD, true, XPackLicenseState::isWatcherAllowed, true);
}
- public void testWatcherBasicStandardLicense() throws Exception {
- assertAllowed(randomFrom(BASIC, STANDARD), true, XPackLicenseState::isWatcherAllowed, false);
+ public void testWatcherBasicLicense() throws Exception {
+ assertAllowed(BASIC, true, XPackLicenseState::isWatcherAllowed, false);
}
public void testWatcherInactive() {
- assertAllowed(randomFrom(BASIC, STANDARD), false, XPackLicenseState::isWatcherAllowed, false);
+ assertAllowed(BASIC, false, XPackLicenseState::isWatcherAllowed, false);
}
public void testWatcherInactivePlatinumGoldTrial() throws Exception {
- assertAllowed(randomFrom(TRIAL, GOLD, PLATINUM), false, XPackLicenseState::isWatcherAllowed, false);
+ assertAllowed(TRIAL, false, XPackLicenseState::isWatcherAllowed, false);
+ assertAllowed(GOLD, false, XPackLicenseState::isWatcherAllowed, false);
+ assertAllowed(PLATINUM, false, XPackLicenseState::isWatcherAllowed, false);
+ assertAllowed(STANDARD, false, XPackLicenseState::isWatcherAllowed, false);
}
public void testGraphPlatinumTrial() throws Exception {