summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
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.test/tst
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.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
index ce546e357e..cdf9d661d0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
@@ -38,6 +38,7 @@ import org.eclipse.jgit.internal.storage.file.PackLock;
import org.eclipse.jgit.internal.storage.pack.CachedPack;
import org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider;
import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
@@ -370,7 +371,8 @@ public class UploadPackTest {
ByteArrayInputStream send = linesAsInputStream(inputLines);
- server.getConfig().setString("protocol", null, "version", version);
+ server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION,
+ null, ConfigConstants.CONFIG_KEY_VERSION, version);
UploadPack up = new UploadPack(server);
if (postConstructionSetup != null) {
postConstructionSetup.accept(up);
@@ -2253,7 +2255,9 @@ public class UploadPackTest {
@Test
public void testGetPeerAgentProtocolV2() throws Exception {
- server.getConfig().setString("protocol", null, "version", "2");
+ server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION,
+ null, ConfigConstants.CONFIG_KEY_VERSION,
+ TransferConfig.ProtocolVersion.V2.version());
RevCommit one = remote.commit().message("1").create();
remote.update("one", one);