diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-04 14:19:33 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-04 14:19:33 +0200 |
commit | f5d7b41d9bb0a4e6db975cf4d3dc4bc7bb498339 (patch) | |
tree | 94c58fd1d7fb7e7135583c32e1a3dc007ab350e6 /sonar-home | |
parent | 7d6b2b569403ae8c960cce7f8f4f7a8842b24c63 (diff) | |
download | sonarqube-f5d7b41d9bb0a4e6db975cf4d3dc4bc7bb498339.tar.gz sonarqube-f5d7b41d9bb0a4e6db975cf4d3dc4bc7bb498339.zip |
fix test when SONAR_USER_HOME env var is set
Diffstat (limited to 'sonar-home')
-rw-r--r-- | sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java index 027e2d68924..33418cd75ca 100644 --- a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java +++ b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java @@ -20,6 +20,7 @@ package org.sonar.home.cache; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assume.*; import java.nio.file.Files; @@ -50,6 +51,8 @@ public class PersistentCacheBuilderTest { @Test public void read_system_env() { + assumeTrue(System.getenv("SONAR_USER_HOME") == null); + System.setProperty("user.home", temp.getRoot().getAbsolutePath()); PersistentCache cache = new PersistentCacheBuilder().build(); |