File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,16 @@ dependencies {
3636tasks. withType(CheckForbiddenApisTask ). configureEach {
3737 replaceSignatureFiles ' jdk-signatures'
3838}
39+
40+ project. getTasks(). withType(Test . class). configureEach(test -> {
41+ // This is an exception to our usual rule about which tests have entitlements enabled.
42+ // For most subprojects, we enable entitlements for tests if and only if the
43+ // test-build-info plugin is applied, because those are precisely the subprojects
44+ // that need entitlement enforcement in production, so their tests should also have enforcement.
45+ // This subproject's tests are different: they are keenly aware of entitlements,
46+ // and can configure entitlements however they need on a case-by-case basis
47+ // in a manner that would be unduly burdensome for all our other tests.
48+ if (List . of(" test" , " internalClusterTest" ). contains(test. getName())) {
49+ test. systemProperty(" es.entitlement.enableForTests" , " true" );
50+ }
51+ });
You can’t perform that action at this time.
0 commit comments