diff options
Diffstat (limited to 'server/sonar-process/src/test')
14 files changed, 0 insertions, 825 deletions
diff --git a/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java b/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java deleted file mode 100644 index 8350eafaa3e..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/AesCipherTest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.sonar.process; - -import com.google.common.io.Resources; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang.StringUtils; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -import javax.crypto.BadPaddingException; -import java.io.File; -import java.security.InvalidKeyException; -import java.security.Key; - -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; - - -public class AesCipherTest { - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void generateRandomSecretKey() { - AesCipher cipher = new AesCipher(null); - - String key = cipher.generateRandomSecretKey(); - - assertThat(StringUtils.isNotBlank(key)).isTrue(); - assertThat(Base64.isArrayByteBase64(key.getBytes())).isTrue(); - } - - @Test - public void encrypt() throws Exception { - AesCipher cipher = new AesCipher(pathToSecretKey()); - - String encryptedText = cipher.encrypt("this is a secret"); - - assertThat(StringUtils.isNotBlank(encryptedText)).isTrue(); - assertThat(Base64.isArrayByteBase64(encryptedText.getBytes())).isTrue(); - } - - @Test - public void encrypt_bad_key() throws Exception { - thrown.expect(RuntimeException.class); - thrown.expectMessage("Invalid AES key"); - - AesCipher cipher = new AesCipher(getPath("bad_secret_key.txt")); - - cipher.encrypt("this is a secret"); - } - - @Test - public void decrypt() throws Exception { - AesCipher cipher = new AesCipher(pathToSecretKey()); - - // the following value has been encrypted with the key /org/sonar/api/config/AesCipherTest/aes_secret_key.txt - String clearText = cipher.decrypt("9mx5Zq4JVyjeChTcVjEide4kWCwusFl7P2dSVXtg9IY="); - - assertThat(clearText).isEqualTo("this is a secret"); - } - - @Test - public void decrypt_bad_key() throws Exception { - AesCipher cipher = new AesCipher(getPath("bad_secret_key.txt")); - - try { - cipher.decrypt("9mx5Zq4JVyjeChTcVjEide4kWCwusFl7P2dSVXtg9IY="); - fail(); - - } catch (RuntimeException e) { - assertThat(e.getCause()).isInstanceOf(InvalidKeyException.class); - } - } - - @Test - public void decrypt_other_key() throws Exception { - AesCipher cipher = new AesCipher(getPath("other_secret_key.txt")); - - try { - // text encrypted with another key - cipher.decrypt("9mx5Zq4JVyjeChTcVjEide4kWCwusFl7P2dSVXtg9IY="); - fail(); - - } catch (RuntimeException e) { - assertThat(e.getCause()).isInstanceOf(BadPaddingException.class); - } - } - - @Test - public void encryptThenDecrypt() throws Exception { - AesCipher cipher = new AesCipher(pathToSecretKey()); - - assertThat(cipher.decrypt(cipher.encrypt("foo"))).isEqualTo("foo"); - } - - @Test - public void testDefaultPathToSecretKey() { - AesCipher cipher = new AesCipher(null); - - String path = cipher.getPathToSecretKey(); - - assertThat(StringUtils.isNotBlank(path)).isTrue(); - assertThat(new File(path).getName()).isEqualTo("sonar-secret.txt"); - } - - @Test - public void loadSecretKeyFromFile() throws Exception { - AesCipher cipher = new AesCipher(null); - Key secretKey = cipher.loadSecretFileFromFile(pathToSecretKey()); - assertThat(secretKey.getAlgorithm()).isEqualTo("AES"); - assertThat(secretKey.getEncoded().length).isGreaterThan(10); - } - - @Test - public void loadSecretKeyFromFile_trim_content() throws Exception { - String path = getPath("non_trimmed_secret_key.txt"); - AesCipher cipher = new AesCipher(null); - - Key secretKey = cipher.loadSecretFileFromFile(path); - - assertThat(secretKey.getAlgorithm()).isEqualTo("AES"); - assertThat(secretKey.getEncoded().length).isGreaterThan(10); - } - - @Test - public void loadSecretKeyFromFile_file_does_not_exist() throws Exception { - thrown.expect(IllegalStateException.class); - - AesCipher cipher = new AesCipher(null); - cipher.loadSecretFileFromFile("/file/does/not/exist"); - } - - @Test - public void loadSecretKeyFromFile_no_property() throws Exception { - thrown.expect(IllegalStateException.class); - - AesCipher cipher = new AesCipher(null); - cipher.loadSecretFileFromFile(null); - } - - @Test - public void hasSecretKey() throws Exception { - AesCipher cipher = new AesCipher(pathToSecretKey()); - - assertThat(cipher.hasSecretKey()).isTrue(); - } - - @Test - public void doesNotHaveSecretKey() throws Exception { - AesCipher cipher = new AesCipher("/my/twitter/id/is/SimonBrandhof"); - - assertThat(cipher.hasSecretKey()).isFalse(); - } - - private static String getPath(String file) { - return Resources.getResource(AesCipherTest.class, "AesCipherTest/" + file).getPath(); - } - - private static String pathToSecretKey() throws Exception { - return getPath("aes_secret_key.txt"); - } - -} diff --git a/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java b/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java deleted file mode 100644 index 6191eb2ba1f..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/ConfigurationUtilsTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.process; - -import com.google.common.collect.Maps; -import org.junit.Test; - -import java.util.Map; -import java.util.Properties; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -public class ConfigurationUtilsTest { - @Test - public void shouldInterpolateVariables() { - Properties input = new Properties(); - input.setProperty("hello", "world"); - input.setProperty("url", "${env:SONAR_JDBC_URL}"); - input.setProperty("do_not_change", "${SONAR_JDBC_URL}"); - Map<String, String> variables = Maps.newHashMap(); - variables.put("SONAR_JDBC_URL", "jdbc:h2:mem"); - - Properties output = ConfigurationUtils.interpolateVariables(input, variables); - - assertThat(output.size(), is(3)); - assertThat(output.getProperty("hello"), is("world")); - assertThat(output.getProperty("url"), is("jdbc:h2:mem")); - assertThat(output.getProperty("do_not_change"), is("${SONAR_JDBC_URL}")); - - // input is not changed - assertThat(input.size(), is(3)); - assertThat(input.getProperty("hello"), is("world")); - assertThat(input.getProperty("url"), is("${env:SONAR_JDBC_URL}")); - assertThat(input.getProperty("do_not_change"), is("${SONAR_JDBC_URL}")); - } - -} diff --git a/server/sonar-process/src/test/java/org/sonar/process/EncryptionTest.java b/server/sonar-process/src/test/java/org/sonar/process/EncryptionTest.java deleted file mode 100644 index 0c11856b0fa..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/EncryptionTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.sonar.process; - -import org.junit.Test; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -public class EncryptionTest { - - @Test - public void isEncrypted() { - Encryption encryption = new Encryption(null); - assertThat(encryption.isEncrypted("{aes}ADASDASAD"), is(true)); - assertThat(encryption.isEncrypted("{b64}ADASDASAD"), is(true)); - assertThat(encryption.isEncrypted("{abc}ADASDASAD"), is(true)); - - assertThat(encryption.isEncrypted("{}"), is(false)); - assertThat(encryption.isEncrypted("{foo"), is(false)); - assertThat(encryption.isEncrypted("foo{aes}"), is(false)); - } - - @Test - public void decrypt() { - Encryption encryption = new Encryption(null); - assertThat(encryption.decrypt("{b64}Zm9v"), is("foo")); - } - - @Test - public void decrypt_unknown_algorithm() { - Encryption encryption = new Encryption(null); - assertThat(encryption.decrypt("{xxx}Zm9v"), is("{xxx}Zm9v")); - } - - @Test - public void decrypt_uncrypted_text() { - Encryption encryption = new Encryption(null); - assertThat(encryption.decrypt("foo"), is("foo")); - } -} diff --git a/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java b/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java deleted file mode 100644 index 11088902b14..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.process; - -import org.fest.assertions.Assertions; -import org.junit.Test; - -import static org.fest.assertions.Fail.fail; - -public class MinimumViableSystemTest { - - /** - * Verifies that all checks can be verified without error. - * Test environment does not necessarily follows all checks. - */ - @Test - public void check() throws Exception { - MinimumViableSystem mve = new MinimumViableSystem(); - - try { - mve.check(); - // ok - } catch (MessageException e) { - // also ok. All other exceptions are errors. - } - } - - @Test - public void checkJavaVersion() throws Exception { - MinimumViableSystem mve = new MinimumViableSystem(); - - // yes, sources are compiled with a supported Java version! - mve.checkJavaVersion(); - - mve.checkJavaVersion("1.6.1_b2"); - try { - mve.checkJavaVersion("1.5.2"); - fail(); - } catch (MessageException e) { - Assertions.assertThat(e).hasMessage("Minimal required Java version is 1.6. Got 1.5.2."); - } - } - - @Test - public void checkJavaOption() throws Exception { - String key = "MinimumViableEnvironmentTest.test.prop"; - MinimumViableSystem mve = new MinimumViableSystem() - .setRequiredJavaOption(key, "true"); - - try { - System.setProperty(key, "false"); - mve.checkJavaOptions(); - fail(); - } catch (MessageException e) { - Assertions.assertThat(e).hasMessage("JVM option '" + key + "' must be set to 'true'. Got 'false'"); - } - - System.setProperty(key, "true"); - mve.checkJavaOptions(); - // do not fail - } -} diff --git a/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java b/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java deleted file mode 100644 index 09f6a597209..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/NetworkUtilsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.process; - -import org.junit.Test; - -import java.net.ServerSocket; - -import static org.fest.assertions.Assertions.assertThat; - -public class NetworkUtilsTest { - - - @Test - public void find_free_port() throws Exception { - int port = NetworkUtils.freePort(); - assertThat(port).isGreaterThan(1024); - } - - @Test - public void find_multiple_free_port() throws Exception { - int port1 = NetworkUtils.freePort(); - int port2 = NetworkUtils.freePort(); - - assertThat(port1).isGreaterThan(1024); - assertThat(port2).isGreaterThan(1024); - - assertThat(port1).isNotSameAs(port2); - } - - @Test - public void find_multiple_free_non_adjacent_port() throws Exception { - int port1 = NetworkUtils.freePort(); - - ServerSocket socket = new ServerSocket(port1 + 1); - - int port2 = NetworkUtils.freePort(); - - assertThat(port1).isGreaterThan(1024); - assertThat(port2).isGreaterThan(1024); - - assertThat(port1).isNotSameAs(port2); - } -}
\ No newline at end of file diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java deleted file mode 100644 index 460983290b0..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessWrapperTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.process; - -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; -import java.net.ServerSocket; - -public class ProcessWrapperTest { - - int freePort; - - @Before - public void setup() throws IOException { - ServerSocket socket = new ServerSocket(0); - freePort = socket.getLocalPort(); - socket.close(); - } - - - @Test - public void has_dummy_app(){ - - } - - -// @Test -// @Ignore("Not a good idea to assert on # of VMs") -// public void process_should_run() throws IOException, MalformedObjectNameException, InterruptedException { -// -// LocalVirtualMachine.getAllVirtualMachines().size(); -// int VMcount = LocalVirtualMachine.getAllVirtualMachines().size(); -// -// System.out.println("LocalVirtualMachine.getAllVirtualMachines() = " + LocalVirtualMachine.getAllVirtualMachines()); -// -// RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean(); -// ProcessWrapper wrapper = wrapper = new ProcessWrapper(ProcessTest.TestProcess.class.getName(), -// Collections.EMPTY_MAP, "TEST", freePort, runtime.getClassPath()); -// -// assertThat(wrapper).isNotNull(); -// assertThat(wrapper.isReady()).isTrue(); -// -// assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount + 1); -// -// wrapper.stop(); -// assertThat(LocalVirtualMachine.getAllVirtualMachines().size()).isEqualTo(VMcount); -// -// } -}
\ No newline at end of file diff --git a/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java b/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java deleted file mode 100644 index 775d24a2a64..00000000000 --- a/server/sonar-process/src/test/java/org/sonar/process/PropsTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.process; - -import org.junit.Test; - -import java.util.Properties; - -import static org.fest.assertions.Assertions.assertThat; -import static org.fest.assertions.Fail.fail; - -public class PropsTest { - - @Test - public void of() throws Exception { - Properties p = new Properties(); - p.setProperty("foo", "bar"); - Props props = new Props(p); - - assertThat(props.of("foo")).isEqualTo("bar"); - assertThat(props.of("foo", "default value")).isEqualTo("bar"); - assertThat(props.of("unknown")).isNull(); - assertThat(props.of("unknown", "default value")).isEqualTo("default value"); - } - - @Test - public void intOf() throws Exception { - Properties p = new Properties(); - p.setProperty("foo", "33"); - p.setProperty("blank", ""); - Props props = new Props(p); - - assertThat(props.intOf("foo")).isEqualTo(33); - assertThat(props.intOf("foo", 44)).isEqualTo(33); - assertThat(props.intOf("blank")).isNull(); - assertThat(props.intOf("blank", 55)).isEqualTo(55); - assertThat(props.intOf("unknown")).isNull(); - assertThat(props.intOf("unknown", 44)).isEqualTo(44); - } - - @Test - public void intOf_not_integer() throws Exception { - Properties p = new Properties(); - p.setProperty("foo", "bar"); - Props props = new Props(p); - - try { - props.intOf("foo"); - fail(); - } catch (IllegalStateException e) { - assertThat(e).hasMessage("Value of property foo is not an integer: bar"); - } - } - - @Test - public void booleanOf() throws Exception { - Properties p = new Properties(); - p.setProperty("foo", "True"); - p.setProperty("bar", "false"); - Props props = new Props(p); - - assertThat(props.booleanOf("foo")).isTrue(); - assertThat(props.booleanOf("bar")).isFalse(); - assertThat(props.booleanOf("unknown")).isFalse(); - } - - @Test - public void booleanOf_default_value() throws Exception { - Properties p = new Properties(); - p.setProperty("foo", "true"); - p.setProperty("bar", "false"); - Props props = new Props(p); - - assertThat(props.booleanOf("unset", false)).isFalse(); - assertThat(props.booleanOf("unset", true)).isTrue(); - assertThat(props.booleanOf("foo", false)).isTrue(); - assertThat(props.booleanOf("bar", true)).isFalse(); - } -} diff --git a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/aes_secret_key.txt b/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/aes_secret_key.txt deleted file mode 100644 index 65b98c522da..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/aes_secret_key.txt +++ /dev/null @@ -1 +0,0 @@ -0PZz+G+f8mjr3sPn4+AhHg==
\ No newline at end of file diff --git a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/bad_secret_key.txt b/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/bad_secret_key.txt deleted file mode 100644 index b33e179e5c8..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/bad_secret_key.txt +++ /dev/null @@ -1 +0,0 @@ -badbadbad==
\ No newline at end of file diff --git a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/non_trimmed_secret_key.txt b/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/non_trimmed_secret_key.txt deleted file mode 100644 index ab83e4adc03..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/non_trimmed_secret_key.txt +++ /dev/null @@ -1,3 +0,0 @@ - - 0PZz+G+f8mjr3sPn4+AhHg== - diff --git a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/other_secret_key.txt b/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/other_secret_key.txt deleted file mode 100644 index 23f5ecf5104..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/AesCipherTest/other_secret_key.txt +++ /dev/null @@ -1 +0,0 @@ -IBxEUxZ41c8XTxyaah1Qlg==
\ No newline at end of file diff --git a/server/sonar-process/src/test/resources/org/sonar/process/LoggingTest/logback-access.xml b/server/sonar-process/src/test/resources/org/sonar/process/LoggingTest/logback-access.xml deleted file mode 100644 index 298193e01fa..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/LoggingTest/logback-access.xml +++ /dev/null @@ -1 +0,0 @@ -<configuration/> diff --git a/server/sonar-process/src/test/resources/org/sonar/process/ProcessTest/sonar.properties b/server/sonar-process/src/test/resources/org/sonar/process/ProcessTest/sonar.properties deleted file mode 100644 index 1577a214b3b..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/ProcessTest/sonar.properties +++ /dev/null @@ -1,212 +0,0 @@ -# This file must contain only ISO 8859-1 characters -# see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html#load(java.io.InputStream) -# -# To use an environment variable, use the following syntax : ${env:NAME_OF_ENV_VARIABLE} -# For example: -# sonar.jdbc.url= ${env:SONAR_JDBC_URL} -# -# -# See also the file conf/wrapper.conf for JVM advanced settings - - - -#-------------------------------------------------------------------------------------------------- -# DATABASE -# -# IMPORTANT: the embedded H2 database is used by default. It is recommended for tests only. -# Please use a production-ready database. Supported databases are MySQL, Oracle, PostgreSQL -# and Microsoft SQLServer. - -# Permissions to create tables, indices and triggers must be granted to JDBC user. -# The schema must be created first. -sonar.jdbc.username=sonar -sonar.jdbc.password=sonar - -#----- Embedded database H2 -# Note: it does not accept connections from remote hosts, so the -# SonarQube server and the maven plugin must be executed on the same host. - -# Comment the following line to deactivate the default embedded database. -sonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar - -# directory containing H2 database files. By default it's the /data directory in the SonarQube installation. -#sonar.embeddedDatabase.dataDir= -# H2 embedded database server listening port, defaults to 9092 -#sonar.embeddedDatabase.port=9092 - - -#----- MySQL 5.x -# Comment the embedded database and uncomment the following line to use MySQL -#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true - - -#----- Oracle 10g/11g -# To connect to Oracle database: -# -# - It's recommended to use the latest version of the JDBC driver (ojdbc6.jar). -# Download it in http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html -# - Copy the driver to the directory extensions/jdbc-driver/oracle/ -# - If you need to set the schema, please refer to http://jira.codehaus.org/browse/SONAR-5000 -# - Comment the embedded database and uncomment the following line: -#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE - - -#----- PostgreSQL 8.x/9.x -# Comment the embedded database and uncomment the following property to use PostgreSQL. -# If you don't use the schema named "public", please refer to http://jira.codehaus.org/browse/SONAR-5000 -#sonar.jdbc.url=jdbc:postgresql://localhost/sonar - - -#----- Microsoft SQLServer -# The Jtds open source driver is available in extensions/jdbc-driver/mssql. More details on http://jtds.sourceforge.net -#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor - - -#----- Connection pool settings -sonar.jdbc.maxActive=20 -sonar.jdbc.maxIdle=5 -sonar.jdbc.minIdle=2 -sonar.jdbc.maxWait=5000 -sonar.jdbc.minEvictableIdleTimeMillis=600000 -sonar.jdbc.timeBetweenEvictionRunsMillis=30000 - - - -#-------------------------------------------------------------------------------------------------- -# WEB SERVER - -# Binding IP address. For servers with more than one IP address, this property specifies which -# address will be used for listening on the specified ports. -# By default, ports will be used on all IP addresses associated with the server. -#sonar.web.host=0.0.0.0 - -# Web context. When set, it must start with forward slash (for example /sonarqube). -# The default value is root context (empty value). -#sonar.web.context= - -# TCP port for incoming HTTP connections. Disabled when value is -1. -#sonar.web.port=9000 - -# TCP port for incoming HTTPS connections. Disabled when value is -1 (default). -#sonar.web.https.port=-1 - -# HTTPS - the alias used to for the server certificate in the keystore. -# If not specified the first key read in the keystore is used. -#sonar.web.https.keyAlias= - -# HTTPS - the password used to access the server certificate from the -# specified keystore file. The default value is "changeit". -#sonar.web.https.keyPass=changeit - -# HTTPS - the pathname of the keystore file where is stored the server certificate. -# By default, the pathname is the file ".keystore" in the user home. -# If keystoreType doesn't need a file use empty value. -#sonar.web.https.keystoreFile= - -# HTTPS - the password used to access the specified keystore file. The default -# value is the value of sonar.web.https.keyPass. -#sonar.web.https.keystorePass= - -# HTTPS - the type of keystore file to be used for the server certificate. -# The default value is JKS (Java KeyStore). -#sonar.web.https.keystoreType=JKS - -# HTTPS - the name of the keystore provider to be used for the server certificate. -# If not specified, the list of registered providers is traversed in preference order -# and the first provider that supports the keystore type is used (see sonar.web.https.keystoreType). -#sonar.web.https.keystoreProvider= - -# HTTPS - the pathname of the truststore file which contains trusted certificate authorities. -# By default, this would be the cacerts file in your JRE. -# If truststoreFile doesn't need a file use empty value. -#sonar.web.https.truststoreFile= - -# HTTPS - the password used to access the specified truststore file. -#sonar.web.https.truststorePass= - -# HTTPS - the type of truststore file to be used. -# The default value is JKS (Java KeyStore). -#sonar.web.https.truststoreType=JKS - -# HTTPS - the name of the truststore provider to be used for the server certificate. -# If not specified, the list of registered providers is traversed in preference order -# and the first provider that supports the truststore type is used (see sonar.web.https.truststoreType). -#sonar.web.https.truststoreProvider= - -# HTTPS - whether to enable client certificate authentication. -# The default is false (client certificates disabled). -# Other possible values are 'want' (certificates will be requested, but not required), -# and 'true' (certificates are required). -#sonar.web.https.clientAuth=false - -# The maximum number of connections that the server will accept and process at any given time. -# When this number has been reached, the server will not accept any more connections until -# the number of connections falls below this value. The operating system may still accept connections -# based on the sonar.web.connections.acceptCount property. The default value is 50 for each -# enabled connector. -#sonar.web.http.maxThreads=50 -#sonar.web.https.maxThreads=50 - -# The minimum number of threads always kept running. The default value is 5 for each -# enabled connector. -#sonar.web.http.minThreads=5 -#sonar.web.https.minThreads=5 - -# The maximum queue length for incoming connection requests when all possible request processing -# threads are in use. Any requests received when the queue is full will be refused. -# The default value is 25 for each enabled connector. -#sonar.web.http.acceptCount=25 -#sonar.web.https.acceptCount=25 - -# Access logs are generated in the file logs/access.log. This file is rolled over when it's 5Mb. -# An archive of 3 files is kept in the same directory. -# Access logs are enabled by default. -#sonar.web.accessLogs.enable=true - -# TCP port for incoming AJP connections. Disabled when value is -1. -# sonar.ajp.port=9009 - - - -#-------------------------------------------------------------------------------------------------- -# UPDATE CENTER - -# The Update Center requires an internet connection to request http://update.sonarsource.org -# It is enabled by default. -#sonar.updatecenter.activate=true - -# HTTP proxy (default none) -#http.proxyHost= -#http.proxyPort= - -# NT domain name if NTLM proxy is used -#http.auth.ntlm.domain= - -# SOCKS proxy (default none) -#socksProxyHost= -#socksProxyPort= - -# proxy authentication. The 2 following properties are used for HTTP and SOCKS proxies. -#http.proxyUser= -#http.proxyPassword= - - -#-------------------------------------------------------------------------------------------------- -# NOTIFICATIONS - -# Delay in seconds between processing of notification queue. Default is 60. -#sonar.notifications.delay=60 - - -#-------------------------------------------------------------------------------------------------- -# PROFILING -# Level of information displayed in the logs: NONE (default), BASIC (functional information) and FULL (functional and technical details) -#sonar.log.profilingLevel=NONE - - -#-------------------------------------------------------------------------------------------------- -# DEVELOPMENT MODE -# Only for debugging - -# Set to true to apply Ruby on Rails code changes on the fly -#sonar.rails.dev=false diff --git a/server/sonar-process/src/test/resources/org/sonar/process/PropsTest/sonar.properties b/server/sonar-process/src/test/resources/org/sonar/process/PropsTest/sonar.properties deleted file mode 100644 index 5c06e58a32e..00000000000 --- a/server/sonar-process/src/test/resources/org/sonar/process/PropsTest/sonar.properties +++ /dev/null @@ -1,3 +0,0 @@ -hello: world -foo=bar -java.io.tmpdir=/should/be/overridden |