summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2020-11-30 15:29:01 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2020-11-30 16:54:02 +0100
commit180dfdefa4d0cb561efda7df22f95403c1875bdc (patch)
treef5428e70cd03b2884e69e59c2141176e6a50a57b /org.eclipse.jgit.http.test
parentc053b510b3b921c5859a69bc74b98bcdec9c2a17 (diff)
parent23389a63238c50daf0d8d1e3fd2b1d29f4171645 (diff)
downloadjgit-180dfdefa4d0cb561efda7df22f95403c1875bdc.tar.gz
jgit-180dfdefa4d0cb561efda7df22f95403c1875bdc.zip
Merge branch 'stable-5.9'
* stable-5.9: Add constants for parsing git wire protocol version Change-Id: I1e4174ae8bbefcb71a191dcbf32027d4b35c2b37 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
index 96657761cf..26a453be14 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
@@ -38,6 +38,7 @@ import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.junit.http.AccessEvent;
import org.eclipse.jgit.junit.http.AppServer;
+import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.RefUpdate;
@@ -49,6 +50,7 @@ import org.eclipse.jgit.transport.HttpTransport;
import org.eclipse.jgit.transport.PacketLineIn;
import org.eclipse.jgit.transport.PacketLineOut;
import org.eclipse.jgit.transport.Transport;
+import org.eclipse.jgit.transport.TransferConfig;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.HttpConnection;
@@ -342,8 +344,10 @@ public class HttpClientTests extends AllFactoriesHttpTestCase {
@Test
public void testV2HttpFirstResponse() throws Exception {
- remoteRepository.getRepository().getConfig().setInt(
- "protocol", null, "version", 2);
+ remoteRepository.getRepository().getConfig().setString(
+ ConfigConstants.CONFIG_PROTOCOL_SECTION, null,
+ ConfigConstants.CONFIG_KEY_VERSION,
+ TransferConfig.ProtocolVersion.V2.version());
String url = smartAuthNoneURI.toString() + "/info/refs?service=git-upload-pack";
HttpConnection c = HttpTransport.getConnectionFactory()
@@ -364,8 +368,10 @@ public class HttpClientTests extends AllFactoriesHttpTestCase {
@Test
public void testV2HttpSubsequentResponse() throws Exception {
- remoteRepository.getRepository().getConfig().setInt(
- "protocol", null, "version", 2);
+ remoteRepository.getRepository().getConfig().setString(
+ ConfigConstants.CONFIG_PROTOCOL_SECTION, null,
+ ConfigConstants.CONFIG_KEY_VERSION,
+ TransferConfig.ProtocolVersion.V2.version());
String url = smartAuthNoneURI.toString() + "/git-upload-pack";
HttpConnection c = HttpTransport.getConnectionFactory()