Skip to content

Commit 792457a

Browse files
committed
Alter test security policy to work with Gradle elastic#31496
1 parent 7f77dea commit 792457a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ class BuildPlugin implements Plugin<Project> {
105105
configureDependenciesInfo(project)
106106
}
107107

108-
<<<<<<< HEAD
109-
=======
110108
static void setupSeed(Project project) {
111109
if (project.rootProject.ext.has('testSeed')) {
112110
/* Skip this if we've already pinned the testSeed. It is important
@@ -126,7 +124,6 @@ class BuildPlugin implements Plugin<Project> {
126124
project.ext.testSeed = testSeed
127125
}
128126
}
129-
>>>>>>> Remove randomizedtesting plugin #31496
130127

131128
/** Performs checks on the build environment and prints information about the build environment. */
132129
static void globalBuildInfo(Project project) {
@@ -846,6 +843,8 @@ class BuildPlugin implements Plugin<Project> {
846843
} else {
847844
systemProperty 'runtime.java', project.ext.runtimeJavaVersion.getMajorVersion()
848845
}
846+
// TODO: equivalent for idea
847+
systemProperty "gradle.user.home", project.gradle.gradleUserHomeDir
849848
// TODO: remove setting logging level via system property
850849
systemProperty 'tests.logger.level', 'WARN'
851850
for (Map.Entry<String, String> property : System.properties.entrySet()) {

server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy

+9
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,12 @@ grant codeBase "${codebase.httpasyncclient}" {
8686
// rest client uses system properties which gets the default proxy
8787
permission java.net.NetPermission "getProxySelector";
8888
};
89+
90+
grant codeBase "file:${gradle.user.home}/-" {
91+
permission java.security.AllPermission;
92+
};
93+
94+
grant codeBase "file:~/.gradle/caches/-" {
95+
permission java.security.AllPermission;
96+
};
97+

0 commit comments

Comments
 (0)