Skip to content

Commit 7d23843

Browse files
committed
Replace hard-coded versions in test assertions
1 parent 0b44e4a commit 7d23843

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/support/SecurityStatusChangeListenerTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public void testSecurityEnabledToDisabled() {
8484
assertWarnings("The default behavior of disabling security on basic"
8585
+ " licenses is deprecated. In a later version of Elasticsearch, the value of [xpack.security.enabled] will "
8686
+ "default to \"true\" , regardless of the license level. "
87-
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security, "
87+
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/" + Version.CURRENT.major + "." +
88+
Version.CURRENT.minor + "/security-minimal-setup.html to enable security, "
8889
+ "or explicitly disable security by setting [xpack.security.enabled] to false in elasticsearch.yml");
8990

9091
logAppender.assertAllExpectationsMatched();
@@ -112,7 +113,8 @@ public void testSecurityDisabledToEnabled() {
112113
assertWarnings("The default behavior of disabling security on trial"
113114
+ " licenses is deprecated. In a later version of Elasticsearch, the value of [xpack.security.enabled] will "
114115
+ "default to \"true\" , regardless of the license level. "
115-
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security, "
116+
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/" + Version.CURRENT.major + "." +
117+
Version.CURRENT.minor +"/security-minimal-setup.html to enable security, "
116118
+ "or explicitly disable security by setting [xpack.security.enabled] to false in elasticsearch.yml");
117119

118120
when(licenseState.getOperationMode()).thenReturn(License.OperationMode.BASIC);
@@ -143,7 +145,8 @@ public void testWarningForImplicitlyDisabledSecurity() {
143145
assertWarnings("The default behavior of disabling security on trial"
144146
+ " licenses is deprecated. In a later version of Elasticsearch, the value of [xpack.security.enabled] will "
145147
+ "default to \"true\" , regardless of the license level. "
146-
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-minimal-setup.html to enable security, "
148+
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/" + Version.CURRENT.major + "." +
149+
Version.CURRENT.minor + "/security-minimal-setup.html to enable security, "
147150
+ "or explicitly disable security by setting [xpack.security.enabled] to false in elasticsearch.yml");
148151
}
149152

0 commit comments

Comments
 (0)