.addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS))
// required for logback tomcat valve
.setEnvVariable(ProcessProperties.PATH_LOGS, props.nonNullValue(ProcessProperties.PATH_LOGS))
- // ensure JRuby uses SQ's temp directory as temp directory (eg. for temp files used during HTTP uploads)
- .setEnvVariable("TMPDIR", props.nonNullValue(ProcessProperties.PATH_TEMP))
.setClassName("org.sonar.server.app.WebServer")
.addClasspath("./lib/common/*")
.addClasspath("./lib/server/*");
import org.sonar.process.monitor.Monitor;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.entry;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
assertThat(commands.get(1).getClasspath()).contains("oracle/ojdbc6.jar");
}
- @Test
- public void sets_TMPDIR_env_var_of_Web_process() throws Exception {
- Props props = initDefaultProps();
- String expectedTmpDir = "expected tmp dir";
- props.set("sonar.path.temp", expectedTmpDir);
-
- List<JavaCommand> commands = start(props);
-
- assertThat(commands.get(1).getEnvVariables()).contains(entry("TMPDIR", expectedTmpDir));
- }
-
@Test
public void configure_http_and_https_proxies_on_all_processes() throws Exception {
Props props = initDefaultProps();