]> source.dussan.org Git - gitblit.git/commitdiff
Fixes and adjustments to test suite
authorJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:14:30 +0000 (17:14 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 11 Jul 2012 21:14:30 +0000 (17:14 -0400)
test-users.conf
tests/com/gitblit/tests/GitBlitSuite.java
tests/com/gitblit/tests/GitServletTest.java
tests/com/gitblit/tests/SyndicationUtilsTest.java
tests/com/gitblit/tests/TicgitUtilsTest.java

index 70e9a871aed830cd497e67d38746299069d0218b..5551e47ab298a57b102758f144b5e8580ee91c55 100644 (file)
@@ -1,5 +1,6 @@
 [user "admin"]
        password = admin
+       cookie = dd94709528bb1c83d08f3088d4043f4742891f4f
        role = "#admin"
        role = "#notfederated"
 [team "admins"]
index 0cb63ec715b432eed879a5806a6ca1b77cadcae5..07c5e08e9ab659a84b4d43caf35348f7a7fc96e6 100644 (file)
@@ -101,6 +101,9 @@ public class GitBlitSuite {
                        // already started\r
                        return false;\r
                }\r
+               \r
+               GitServletTest.deleteWorkingFolders();\r
+               \r
                // Start a Gitblit instance\r
                Executors.newSingleThreadExecutor().execute(new Runnable() {\r
                        public void run() {\r
@@ -123,7 +126,7 @@ public class GitBlitSuite {
                GitBlitServer.main("--stop", "--shutdownPort", "" + shutdownPort);\r
 \r
                // Wait a few seconds for it to be running\r
-               Thread.sleep(2500);\r
+               Thread.sleep(5000);\r
        }\r
 \r
        @BeforeClass\r
@@ -132,7 +135,7 @@ public class GitBlitSuite {
 \r
                if (REPOSITORIES.exists() || REPOSITORIES.mkdirs()) {\r
                        cloneOrFetch("helloworld.git", "https://github.com/git/hello-world.git");\r
-                       cloneOrFetch("ticgit.git", "https://github.com/jeffWelling/ticgit.git");\r
+                       cloneOrFetch("ticgit.git", "https://github.com/schacon/ticgit.git");\r
                        cloneOrFetch("test/jgit.git", "https://github.com/eclipse/jgit.git");\r
                        cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git");\r
                        cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");\r
index 2f9a9c423d05636d7ab6663244e38acdb85109c3..848a1d051829bf9cf5688ac1254e22c5b2ebe23b 100644 (file)
@@ -42,7 +42,6 @@ public class GitServletTest {
 \r
        @BeforeClass\r
        public static void startGitblit() throws Exception {\r
-               deleteWorkingFolders();\r
                started.set(GitBlitSuite.startGitblit());\r
        }\r
 \r
@@ -50,11 +49,11 @@ public class GitServletTest {
        public static void stopGitblit() throws Exception {\r
                if (started.get()) {\r
                        GitBlitSuite.stopGitblit();\r
+                       deleteWorkingFolders();\r
                }\r
-               deleteWorkingFolders();\r
        }\r
        \r
-       private static void deleteWorkingFolders() throws Exception {\r
+       public static void deleteWorkingFolders() throws Exception {\r
                if (ticgitFolder.exists()) {\r
                        FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE);\r
                }\r
index ca6678de2bb4d1d7a955bd60873e5f51c986f3d6..4542adbd133976dcd728818220c1fb52ca1003cf 100644 (file)
@@ -67,7 +67,7 @@ public class SyndicationUtilsTest {
                Set<String> links = new HashSet<String>();\r
                for (int i = 0; i < 2; i++) {\r
                        List<FeedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url, "ticgit.git",\r
-                                       "deving", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());\r
+                                       "master", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());\r
                        assertTrue(feed != null);\r
                        assertTrue(feed.size() > 0);\r
                        assertEquals(5, feed.size());\r
index a77dae43b0b38845228978f3ad5a4027b06b5416..74f9e44eb14830aa1fda64ef203f4fa9cc2e2466 100644 (file)
@@ -82,8 +82,6 @@ public class TicgitUtilsTest {
                                .getTicket(repository, tickets.get(tickets.size() - 1).name);\r
                repository.close();\r
                assertNotNull(ticket);\r
-               assertEquals(\r
-                               "1254123752_comments-on-ticgits-longer-than-5-lines-can-t-be-viewed-entirely_266",\r
-                               ticket.name);\r
+               assertEquals("1206206148_add-attachment-to-ticket_138", ticket.name);\r
        }\r
 }
\ No newline at end of file