Skip to content

Commit 2251cd9

Browse files
[NO-JIRA] Update orchestrator to 3.40.0.183
1 parent e444841 commit 2251cd9

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

its/it-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<dependency>
2828
<groupId>org.sonarsource.orchestrator</groupId>
2929
<artifactId>sonar-orchestrator</artifactId>
30-
<version>3.38.0.115</version>
30+
<version>3.40.0.183</version>
3131
<scope>test</scope>
3232
<exclusions>
3333
<exclusion>

its/it-tests/src/test/java/com/sonar/scanner/api/it/ProxyTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public void simple_analysis_with_proxy_no_auth() throws Exception {
182182

183183
// Don't use proxy
184184
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), ORCHESTRATOR.getServer().getUrl());
185-
assertThat(buildResult.getLastStatus()).isEqualTo(0);
185+
assertThat(buildResult.getLastStatus()).isZero();
186186
assertThat(seenByProxy).isEmpty();
187187

188188
Map<String, String> params = new HashMap<>();
@@ -192,7 +192,7 @@ public void simple_analysis_with_proxy_no_auth() throws Exception {
192192
params.put("http.proxyPort", "" + httpProxyPort);
193193

194194
buildResult = scanner.executeSimpleProject(project("js-sample"), ORCHESTRATOR.getServer().getUrl(), params);
195-
assertThat(buildResult.getLastStatus()).isEqualTo(0);
195+
assertThat(buildResult.getLastStatus()).isZero();
196196
assertThat(seenByProxy).isNotEmpty();
197197
}
198198

@@ -217,7 +217,7 @@ public void simple_analysis_with_proxy_auth() throws Exception {
217217
buildResult = scanner.executeSimpleProject(project("js-sample"), ORCHESTRATOR.getServer().getUrl(), params);
218218
assertThat(seenByProxy).isNotEmpty();
219219
if (ORCHESTRATOR.getServer().version().isGreaterThanOrEquals(6, 1)) {
220-
assertThat(buildResult.getLastStatus()).isEqualTo(0);
220+
assertThat(buildResult.getLastStatus()).isZero();
221221
}
222222
}
223223

its/it-tests/src/test/java/com/sonar/scanner/api/it/SSLTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void simple_analysis_with_server_and_client_certificate() throws Exceptio
168168
SimpleScanner scanner = new SimpleScanner();
169169
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), "https://localhost:" + httpsPort);
170170

171-
assertThat(buildResult.getLastStatus()).isNotEqualTo(0);
171+
assertThat(buildResult.getLastStatus()).isNotZero();
172172
assertThat(buildResult.getLogs()).contains("javax.net.ssl.SSLHandshakeException");
173173

174174
Path clientTruststore = Paths.get(SSLTest.class.getResource(KEYSTORE_CLIENT_WITH_CA).toURI()).toAbsolutePath();
@@ -185,7 +185,7 @@ public void simple_analysis_with_server_and_client_certificate() throws Exceptio
185185
params.put("javax.net.ssl.keyStorePassword", CLIENT_KEYSTORE_PASSWORD);
186186

187187
buildResult = scanner.executeSimpleProject(project("js-sample"), "https://localhost:" + httpsPort, params);
188-
assertThat(buildResult.getLastStatus()).isEqualTo(0);
188+
assertThat(buildResult.getLastStatus()).isZero();
189189
}
190190

191191
@Test
@@ -194,7 +194,7 @@ public void simple_analysis_with_server_and_without_client_certificate_is_failin
194194
SimpleScanner scanner = new SimpleScanner();
195195
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), "https://localhost:" + httpsPort);
196196

197-
assertThat(buildResult.getLastStatus()).isNotEqualTo(0);
197+
assertThat(buildResult.getLastStatus()).isNotZero();
198198
assertThat(buildResult.getLogs()).contains("javax.net.ssl.SSLHandshakeException");
199199

200200
Path clientTruststore = Paths.get(SSLTest.class.getResource(KEYSTORE_CLIENT_WITH_CA).toURI()).toAbsolutePath();
@@ -247,7 +247,7 @@ private void simple_analysis_with_server_certificate(String clientTrustStore, St
247247
SimpleScanner scanner = new SimpleScanner();
248248

249249
BuildResult buildResult = scanner.executeSimpleProject(project("js-sample"), "https://localhost:" + httpsPort);
250-
assertThat(buildResult.getLastStatus()).isNotEqualTo(0);
250+
assertThat(buildResult.getLastStatus()).isNotZero();
251251
assertThat(buildResult.getLogs()).contains("javax.net.ssl.SSLHandshakeException");
252252

253253
Path clientTruststore = Paths.get(SSLTest.class.getResource(clientTrustStore).toURI()).toAbsolutePath();
@@ -258,6 +258,6 @@ private void simple_analysis_with_server_certificate(String clientTrustStore, St
258258
params.put("javax.net.ssl.trustStorePassword", keyStorePassword);
259259

260260
buildResult = scanner.executeSimpleProject(project("js-sample"), "https://localhost:" + httpsPort, params);
261-
assertThat(buildResult.getLastStatus()).isEqualTo(0);
261+
assertThat(buildResult.getLastStatus()).isZero();
262262
}
263263
}

its/it-tests/src/test/java/com/sonar/scanner/api/it/ScannerApiTestSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.time.Instant;
2626
import java.time.ZoneId;
2727
import java.time.format.DateTimeFormatter;
28-
import java.time.temporal.ChronoUnit;
2928
import org.apache.commons.lang.StringUtils;
3029
import org.junit.ClassRule;
3130
import org.junit.runner.RunWith;
@@ -42,6 +41,7 @@ public class ScannerApiTestSuite {
4241
@ClassRule
4342
public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
4443
.setSonarVersion(getSystemPropertyOrFail(SONAR_RUNTIME_VERSION))
44+
.useDefaultAdminCredentialsForBuilds(true)
4545
// The scanner api should still be compatible with 7.9
4646
.addPlugin(MavenLocation.of("org.sonarsource.javascript", "sonar-javascript-plugin", "7.0.1.14561"))
4747
.build();

its/it-tests/src/test/java/com/sonar/scanner/api/it/tools/SimpleScanner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020
package com.sonar.scanner.api.it.tools;
2121

22+
import com.sonar.scanner.api.it.ScannerApiTestSuite;
2223
import java.io.IOException;
2324
import java.nio.file.Files;
2425
import java.nio.file.Path;
@@ -76,6 +77,7 @@ private Map<String, String> getSimpleProjectProperties(Path baseDir, String host
7677
analysisProperties.load(Files.newInputStream(propertiesFile));
7778
analysisProperties.setProperty("sonar.projectBaseDir", baseDir.toAbsolutePath().toString());
7879
analysisProperties.setProperty("sonar.host.url", host);
80+
analysisProperties.setProperty("sonar.login", ScannerApiTestSuite.ORCHESTRATOR.getDefaultAdminToken());
7981
analysisProperties.putAll(extraProps);
8082
return (Map) analysisProperties;
8183
}

0 commit comments

Comments
 (0)