]> source.dussan.org Git - sonarqube.git/commitdiff
Fix IT
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Wed, 3 Feb 2016 08:26:49 +0000 (09:26 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Wed, 3 Feb 2016 08:26:49 +0000 (09:26 +0100)
it/it-tests/src/test/java/it/analysis/TempFolderTest.java

index 5053eb4dc8c13e97725e8add97d217fa856520c7..8d58c1ff4e3d73bc38ffa928b3fa9c32f7fbbdfa 100644 (file)
@@ -25,6 +25,8 @@ import com.sonar.orchestrator.build.SonarRunner;
 import com.sonar.orchestrator.locator.FileLocation;
 import it.Category3Suite;
 import java.io.File;
+import java.io.IOException;
+
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
@@ -56,7 +58,7 @@ public class TempFolderTest {
 
   // SONAR-4748
   @Test
-  public void should_create_in_temp_folder() {
+  public void should_create_in_temp_folder() throws IOException {
     File projectDir = ItUtils.projectDir("shared/xoo-sample");
     BuildResult result = scan();
 
@@ -65,9 +67,9 @@ public class TempFolderTest {
 
     result = scan("sonar.createTempFiles", "true");
     assertThat(result.getLogs()).contains(
-      "Creating temp directory: " + projectDir.getAbsolutePath() + File.separator + ".sonar" + File.separator + ".sonartmp" + File.separator + "sonar-it");
+      "Creating temp directory: " + projectDir.getCanonicalPath() + File.separator + ".sonar" + File.separator + ".sonartmp" + File.separator + "sonar-it");
     assertThat(result.getLogs()).contains(
-      "Creating temp file: " + projectDir.getAbsolutePath() + File.separator + ".sonar" + File.separator + ".sonartmp" + File.separator + "sonar-it");
+      "Creating temp file: " + projectDir.getCanonicalPath() + File.separator + ".sonar" + File.separator + ".sonartmp" + File.separator + "sonar-it");
 
     // Verify temp folder is deleted after analysis
     assertThat(new File(projectDir, ".sonar/.sonartmp/sonar-it")).doesNotExist();