Skip to content

Commit

Permalink
Fix another broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
tvernum committed Jan 13, 2020
1 parent c7e537d commit a02c11d
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ public void init() throws Exception {

public void testLicenseOperationModeUpdate() throws Exception {
License.LicenseType type = randomFrom(License.LicenseType.values());
License license = License.builder()
.uid("id")
.expiryDate(0)
.issueDate(0)
.issuedTo("elasticsearch")
.issuer("issuer")
.type(type)
.maxNodes(1)
.build();
final License.Builder licenseBuilder = License.builder()
.uid("id")
.expiryDate(0)
.issueDate(0)
.issuedTo("elasticsearch")
.issuer("issuer")
.type(type);
if (type == License.LicenseType.ENTERPRISE) {
licenseBuilder.maxResourceUnits(1);
} else {
licenseBuilder.maxNodes(1);
}
License license = licenseBuilder.build();

assertThat(license.operationMode(), equalTo(License.OperationMode.resolve(type)));
OperationModeFileWatcherTests.writeMode("gold", licenseModeFile);
Expand Down

0 comments on commit a02c11d

Please sign in to comment.