summaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorFlorian Zschocke <florian.zschocke@devolo.de>2019-11-11 00:33:02 +0100
committerFlorian Zschocke <florian.zschocke@devolo.de>2019-11-11 00:33:02 +0100
commit9bde5212feeafc17dbbf71d190a9d644512267be (patch)
treeabc9e6399539c9171401274c95c07e0e4965878d /src/test/java
parenta6e4c8e5c7b4e3d3cac23449d472f275399a6222 (diff)
downloadgitblit-9bde5212feeafc17dbbf71d190a9d644512267be.tar.gz
gitblit-9bde5212feeafc17dbbf71d190a9d644512267be.zip
Add `clone.bundle` as known command, but reject it as not implemented.
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/gitblit/tests/GitServletTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/test/java/com/gitblit/tests/GitServletTest.java b/src/test/java/com/gitblit/tests/GitServletTest.java
index c433ab18..a816143d 100644
--- a/src/test/java/com/gitblit/tests/GitServletTest.java
+++ b/src/test/java/com/gitblit/tests/GitServletTest.java
@@ -978,8 +978,20 @@ public class GitServletTest extends GitblitUnitTest {
HttpGet request = new HttpGet(testURL);
HttpResponse response = client.execute(request);
-
assertEquals(400, response.getStatusLine().getStatusCode());
}
+ @Test
+ public void testInvalidURLCloneBundle() throws IOException {
+ final String testURL = GitBlitSuite.gitServletUrl + "/helloworld.git/clone.bundle";
+
+ HttpClient client = HttpClientBuilder.create().build();
+ HttpGet request = new HttpGet(testURL);
+
+ HttpResponse response = client.execute(request);
+ assertEquals(501, response.getStatusLine().getStatusCode());
+ String content = IOUtils.toString(response.getEntity().getContent(), "UTF-8");
+ assertNotNull(content);
+ }
+
}