@@ -121,14 +121,14 @@ public void testThatEnterpriseLicenseMayNotHaveMaxNodes() throws Exception {
121
121
.maxNodes (randomIntBetween (1 , 50 ))
122
122
.maxResourceUnits (randomIntBetween (10 , 500 ));
123
123
final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
124
- assertThat (ex , TestMatchers .throwableWithMessage ("maxNodes may not be set for enterprise licenses" ));
124
+ assertThat (ex , TestMatchers .throwableWithMessage ("maxNodes may not be set for enterprise licenses (type=[enterprise]) " ));
125
125
}
126
126
127
127
public void testThatEnterpriseLicenseMustHaveMaxResourceUnits () throws Exception {
128
128
License .Builder builder = randomLicense (License .LicenseType .ENTERPRISE )
129
129
.maxResourceUnits (-1 );
130
130
final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
131
- assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits must be set for enterprise licenses" ));
131
+ assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits must be set for enterprise licenses (type=[enterprise]) " ));
132
132
}
133
133
134
134
public void testThatRegularLicensesMustHaveMaxNodes () throws Exception {
@@ -145,7 +145,8 @@ public void testThatRegularLicensesMayNotHaveMaxResourceUnits() throws Exception
145
145
.maxResourceUnits (randomIntBetween (10 , 500 ))
146
146
.maxNodes (randomIntBetween (1 , 50 ));
147
147
final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
148
- assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits may only be set for enterprise licenses" ));
148
+ assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits may only be set for enterprise licenses (not permitted " +
149
+ "for type=[" + type .getTypeName () + "])" ));
149
150
}
150
151
151
152
public void testLicenseToAndFromXContentForEveryLicenseType () throws Exception {
0 commit comments