use of org.sonar.process.Props in project sonarqube by SonarSource.
the class EsInstallationTest method getExecutable_resolve_executable_for_platform.
@Test
public void getExecutable_resolve_executable_for_platform() throws IOException {
File sqHomeDir = temp.newFolder();
Props props = new Props(new Properties());
props.set(PATH_DATA.getKey(), temp.newFolder().getAbsolutePath());
props.set(PATH_HOME.getKey(), sqHomeDir.getAbsolutePath());
props.set(PATH_TEMP.getKey(), temp.newFolder().getAbsolutePath());
props.set(PATH_LOGS.getKey(), temp.newFolder().getAbsolutePath());
EsInstallation underTest = new EsInstallation(props);
assertThat(underTest.getExecutable()).isEqualTo(new File(sqHomeDir, "elasticsearch/bin/elasticsearch"));
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class LogbackHelperTest method setLevelToOff.
private void setLevelToOff(Level globalLogLevel) {
Properties properties = new Properties();
properties.setProperty("sonar.log.level", globalLogLevel.toString());
LoggerContext context = underTest.apply(newLogLevelConfig().offUnlessTrace("fii").build(), new Props(properties));
assertThat(context.getLogger("fii").getLevel()).isEqualTo(Level.OFF);
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class LogbackHelperTest method log_to_console_setting_enabled.
@Test
public void log_to_console_setting_enabled() {
Properties properties = new Properties();
properties.setProperty("sonar.log.console", "true");
assertThat(underTest.isAllLogsToConsoleEnabled(new Props(properties))).isTrue();
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class Log4JPropertiesBuilderTest method newLog4JPropertiesBuilder.
private static Log4JPropertiesBuilder newLog4JPropertiesBuilder(String... propertyKeysAndValues) {
Properties properties = new Properties();
assertThat(propertyKeysAndValues.length % 2).describedAs("propertyKeysAndValues must have even length").isZero();
for (int i = 0; i < propertyKeysAndValues.length; i++) {
properties.put(propertyKeysAndValues[i++], propertyKeysAndValues[i]);
}
return new Log4JPropertiesBuilder(new Props(properties));
}
use of org.sonar.process.Props in project sonarqube by SonarSource.
the class TomcatConnectorsTest method test_max_http_header_size_for_http_connection.
@Test
public void test_max_http_header_size_for_http_connection() {
TomcatConnectors.configure(tomcat, new Props(new Properties()));
verifyHttpConnector(DEFAULT_PORT, ImmutableMap.of("maxHttpHeaderSize", TomcatConnectors.MAX_HTTP_HEADER_SIZE_BYTES));
}
Aggregations