Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Duft2018-10-09 07:07:47 -0400
committerMatthias Sohn2018-11-01 16:55:33 -0400
commitd5e575f9c1f9990d6adca77a09ab7f838199e5b1 (patch)
tree718c60a19c88e56a7f97193e9a69428e039a220c /org.eclipse.egit.core.test/src
parente63c457ea8a06f54764c7fa29ecf6f65881bf069 (diff)
downloadegit-d5e575f9c1f9990d6adca77a09ab7f838199e5b1.tar.gz
egit-d5e575f9c1f9990d6adca77a09ab7f838199e5b1.tar.xz
egit-d5e575f9c1f9990d6adca77a09ab7f838199e5b1.zip
ConfigureGerritAfterCloneTask - relax matching Gerrit version
Relax checking with regards to SSH port and additional suffixes to the version which might appear (-dirty) Change-Id: I95ff82525d034eb5d6804dff8cd5fb1fcdcedfae Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneMatcherTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneMatcherTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneMatcherTest.java
new file mode 100644
index 000000000..6e8860020
--- /dev/null
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneMatcherTest.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (C) 2018, Markus Duft <markus.duft@ssi-schaefer.com>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.egit.core.op;
+
+import static org.eclipse.egit.core.op.ConfigureGerritAfterCloneTask.isGerritVersion;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ConfigureGerritAfterCloneMatcherTest {
+
+ @Test
+ public void testMatches() {
+ assertTrue(isGerritVersion(
+ "gerrit version 2.15.3-5016-g7169461907-dirty"));
+ assertTrue(isGerritVersion("gerrit version 2.14.6"));
+ assertTrue(isGerritVersion("gerrit version 2.14.6-6-g7f3d26c65a"));
+ assertTrue(isGerritVersion("gerrit version 2.16-rc1-81-gfbf1af9b73"));
+ }
+
+}

Back to the top