aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2020-11-29 13:06:00 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2020-11-29 22:46:51 +0100
commit23389a63238c50daf0d8d1e3fd2b1d29f4171645 (patch)
treeca8a64314f55368e760f0263a4d9cf3f273ab479 /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
parent5cd485e5dda41d2ef06226a692c64f1aa221eb25 (diff)
downloadjgit-23389a63238c50daf0d8d1e3fd2b1d29f4171645.tar.gz
jgit-23389a63238c50daf0d8d1e3fd2b1d29f4171645.zip
Add constants for parsing git wire protocol version
This would allow other JGit users to access and reuse the constants. Change-Id: I1608802f45586af5f8582afa592e26679e9cebe3 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java9
1 files changed, 7 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 e9b4af932e..46ba3aa5d4 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,9 @@ public class UploadPackTest {
ByteArrayInputStream send = linesAsInputStream(inputLines);
- server.getConfig().setString("protocol", null, "version", "2");
+ server.getConfig().setString(ConfigConstants.CONFIG_PROTOCOL_SECTION,
+ null, ConfigConstants.CONFIG_KEY_VERSION,
+ TransferConfig.ProtocolVersion.V2.version());
UploadPack up = new UploadPack(server);
if (postConstructionSetup != null) {
postConstructionSetup.accept(up);
@@ -2165,7 +2168,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);