aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-04-02 14:47:45 +0200
committersonartech <sonartech@sonarsource.com>2024-04-03 20:02:40 +0000
commit369eb731d47e5d6e2a9016f0d6db6f3c272b1c18 (patch)
tree85e81f76fda820eb4ce94e31ba88cd3b43ef1a14 /sonar-scanner-engine/src/test
parentc3da6dcd16ab17e706f17a09a73587f2b58d7f76 (diff)
downloadsonarqube-369eb731d47e5d6e2a9016f0d6db6f3c272b1c18.tar.gz
sonarqube-369eb731d47e5d6e2a9016f0d6db6f3c272b1c18.zip
SONAR-21972 Fix tests to not depend on the operating system's locale
Diffstat (limited to 'sonar-scanner-engine/src/test')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scm/git/ProcessWrapperFactoryTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scm/git/ProcessWrapperFactoryTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scm/git/ProcessWrapperFactoryTest.java
index 1eaa3c5cff6..ed7b600cd25 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scm/git/ProcessWrapperFactoryTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scm/git/ProcessWrapperFactoryTest.java
@@ -20,6 +20,7 @@
package org.sonar.scm.git;
import java.io.IOException;
+import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -41,8 +42,8 @@ public class ProcessWrapperFactoryTest {
public void should_log_error_output_in_debug_mode() throws IOException {
logTester.setLevel(Level.DEBUG);
var root = temp.newFolder().toPath();
- var processWrapper = underTest.create(root, v -> {}, "git", "blame");
- assertThatThrownBy(() -> processWrapper.execute())
+ var processWrapper = underTest.create(root, v -> {}, Map.of("LANG", "en_US"), "git", "blame");
+ assertThatThrownBy(processWrapper::execute)
.isInstanceOf(IllegalStateException.class);
assertThat(logTester.logs(Level.DEBUG).get(0)).startsWith("fatal:");