From 8d68b03cb6512d6cd709530c4bbef68b096999a6 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Sat, 10 Mar 2018 09:53:20 -0700 Subject: [PATCH] Stop using basic license in put license test This is related to elastic/x-pack-elasticsearch#4095. That test uses the a basic license in a test of the route put license. Occasionally, that license is extended due to recent work related to indefinite basic licenses before the test assertions can be performed. This commit changes the test to use a gold license. Original commit: elastic/x-pack-elasticsearch@bf2550f0442aa59be9702b841f33f0ec0a683584 --- .../org/elasticsearch/license/LicensesTransportTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java index b810acc0a80..f53f44911c3 100644 --- a/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java +++ b/plugin/core/src/test/java/org/elasticsearch/license/LicensesTransportTests.java @@ -134,14 +134,14 @@ public class LicensesTransportTests extends ESSingleNodeTestCase { } public void testPutLicensesSimple() throws Exception { - License basicSignedLicense = generateSignedLicense("basic", TimeValue.timeValueMinutes(5)); + License goldSignedLicense = generateSignedLicense("gold", TimeValue.timeValueMinutes(5)); PutLicenseRequestBuilder putLicenseRequestBuilder = - new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(basicSignedLicense) + new PutLicenseRequestBuilder(client().admin().cluster(), PutLicenseAction.INSTANCE).setLicense(goldSignedLicense) .setAcknowledge(true); PutLicenseResponse putLicenseResponse = putLicenseRequestBuilder.get(); assertThat(putLicenseResponse.status(), equalTo(LicensesStatus.VALID)); GetLicenseResponse getLicenseResponse = new GetLicenseRequestBuilder(client().admin().cluster(), GetLicenseAction.INSTANCE).get(); - assertThat(getLicenseResponse.license(), equalTo(basicSignedLicense)); + assertThat(getLicenseResponse.license(), equalTo(goldSignedLicense)); License platinumSignedLicense = generateSignedLicense("platinum", TimeValue.timeValueMinutes(2)); putLicenseRequestBuilder.setLicense(platinumSignedLicense);