Browse Source

Ensure all http tests are run and fix broken tests

HttpClientTests were broken. This wasn't discovered since
maven-surefire-plugin's by default only executes test classes
matching **/*Test.java. Fix this by also including **/*.Tests.java
and fix the failing tests.

Change-Id: I487a30fb333de993a9f8d8fff491d3b0e7fb02cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v4.2.0.201601211800-r
Matthias Sohn 8 years ago
parent
commit
80bf52dfe4

+ 4
- 0
org.eclipse.jgit.http.test/pom.xml View File

@@ -134,6 +134,10 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.io.tmpdir=${project.build.directory} -Xmx300m</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
</plugins>

+ 4
- 3
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java View File

@@ -303,7 +303,7 @@ public class HttpClientTests extends HttpTestCase {
fail("connection opened even info/refs needs auth basic");
} catch (TransportException err) {
String exp = dumbAuthBasicURI + ": "
+ JGitText.get().notAuthorized;
+ JGitText.get().noCredentialsProvider;
assertEquals(exp, err.getMessage());
}
} finally {
@@ -347,7 +347,7 @@ public class HttpClientTests extends HttpTestCase {
fail("connection opened even though service disabled");
} catch (TransportException err) {
String exp = smartAuthBasicURI + ": "
+ JGitText.get().notAuthorized;
+ JGitText.get().noCredentialsProvider;
assertEquals(exp, err.getMessage());
}
} finally {
@@ -369,7 +369,8 @@ public class HttpClientTests extends HttpTestCase {
t.openFetch();
fail("connection opened even though service disabled");
} catch (TransportException err) {
String exp = smartAuthNoneURI + ": Git access forbidden";
String exp = smartAuthNoneURI + ": "
+ JGitText.get().serviceNotEnabledNoName;
assertEquals(exp, err.getMessage());
}
} finally {

Loading…
Cancel
Save