Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 93bf296

Browse files
committed
test against SQ 7.3
1 parent 91583f1 commit 93bf296

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
<test.sonarqube.dist.groupId>fixme.fixme</test.sonarqube.dist.groupId>
4242
<test.sonarqube.dist.artifactId>sonarqube-dist</test.sonarqube.dist.artifactId>
43-
<test.sonarqube.dist.version>6.0</test.sonarqube.dist.version>
43+
<test.sonarqube.dist.version>7.3</test.sonarqube.dist.version>
4444
<test.sonarqube.dist.outputdir>${project.build.directory}/fixtures/sonarqube</test.sonarqube.dist.outputdir>
4545

4646
<test.sonarscanner.dist.groupId>fixme.fixme</test.sonarscanner.dist.groupId>

src/test/java/org/sonar/plugins/stash/fixtures/SonarQube.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void waitForReady() {
107107
while (true) {
108108
System.out.println("Waiting for SonarQube to be available at " + getUrl());
109109
try {
110-
HttpURLConnection conn = (HttpURLConnection)getUrl().openConnection();
110+
HttpURLConnection conn = (HttpURLConnection)getUrl("/api/settings/values.protobuf").openConnection();
111111
conn.connect();
112112
int code = conn.getResponseCode();
113113
if (code == 200) {
@@ -125,14 +125,18 @@ public void waitForReady() {
125125
System.out.println("SonarQube is ready");
126126
}
127127

128-
public URL getUrl() {
128+
private URL getUrl(String file) {
129129
try {
130-
return new URL("http", getHost(), getPort(), "/");
130+
return new URL("http", getHost(), getPort(), file);
131131
} catch (MalformedURLException e) {
132132
return null;
133133
}
134134
}
135135

136+
public URL getUrl() {
137+
return getUrl("/");
138+
}
139+
136140
public boolean createProject(String key, String name) throws IOException {
137141
URL url = new URL(getUrl(),
138142
"/api/projects/create?"

0 commit comments

Comments
 (0)