summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authormanisha <manisha@wso2.com>2014-03-21 14:27:02 +0530
committerJames Moger <james.moger@gitblit.com>2014-05-08 09:00:11 -0400
commit03d5ee0bcc4b9d7b6814d7212d19d1126638810d (patch)
tree87abd3bc8240cd1b5754b5ef6d34fa451127878b /src/test
parent0ee8041f980dab7fee723a326fa2a2f5d1fea054 (diff)
downloadgitblit-03d5ee0bcc4b9d7b6814d7212d19d1126638810d.tar.gz
gitblit-03d5ee0bcc4b9d7b6814d7212d19d1126638810d.zip
Implement FORK RPC request type
Diffstat (limited to 'src/test')
-rw-r--r--src/test/config/test-users.conf1
-rw-r--r--src/test/java/com/gitblit/tests/RpcTests.java6
-rw-r--r--src/test/java/com/gitblit/tests/Test.java11
3 files changed, 17 insertions, 1 deletions
diff --git a/src/test/config/test-users.conf b/src/test/config/test-users.conf
index 1d01f846..4e00903b 100644
--- a/src/test/config/test-users.conf
+++ b/src/test/config/test-users.conf
@@ -6,7 +6,6 @@
role = "#notfederated"
[user "sampleuser"]
password = sampleuser
- cookie = 6e07ed42149fc166206319faffdfba2e2ec82e43
accountType = LOCAL
role = "#none"
[team "admins"]
diff --git a/src/test/java/com/gitblit/tests/RpcTests.java b/src/test/java/com/gitblit/tests/RpcTests.java
index ced1a130..943153de 100644
--- a/src/test/java/com/gitblit/tests/RpcTests.java
+++ b/src/test/java/com/gitblit/tests/RpcTests.java
@@ -191,6 +191,12 @@ public class RpcTests extends GitblitUnitTest {
assertEquals(AccessRestrictionType.VIEW, retrievedRepository.accessRestriction);
assertEquals(AuthorizationControl.AUTHENTICATED, retrievedRepository.authorizationControl);
+ //fork repo
+ UserModel userModel = new UserModel("garbageUser");
+ assertTrue("Failed to create Fork Repository!",
+ RpcUtils.forkRpository(model, userModel, url, account, password.toCharArray()));
+
+
// rename and change access restriciton
String originalName = model.name;
model.name = "garbagerepo2.git";
diff --git a/src/test/java/com/gitblit/tests/Test.java b/src/test/java/com/gitblit/tests/Test.java
new file mode 100644
index 00000000..275c6b4c
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/Test.java
@@ -0,0 +1,11 @@
+package com.gitblit.tests;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: manisha
+ * Date: 3/21/14
+ * Time: 12:03 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public @interface Test {
+}