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@bf2550f044
This commit is contained in:
Tim Brooks 2018-03-10 09:53:20 -07:00
parent 32bc247789
commit 8d68b03cb6
1 changed files with 3 additions and 3 deletions

View File

@ -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);