aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java')
-rw-r--r--server/sonar-process/src/test/java/org/sonar/process/MinimumViableSystemTest.java79
1 files changed, 0 insertions, 79 deletions
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
- }
-}