Fixes and adjustments to test suite
| | |
| | | [user "admin"] |
| | | password = admin |
| | | cookie = dd94709528bb1c83d08f3088d4043f4742891f4f |
| | | role = "#admin" |
| | | role = "#notfederated" |
| | | [team "admins"] |
| | |
| | | // already started
|
| | | return false;
|
| | | }
|
| | | |
| | | GitServletTest.deleteWorkingFolders();
|
| | | |
| | | // Start a Gitblit instance
|
| | | Executors.newSingleThreadExecutor().execute(new Runnable() {
|
| | | public void run() {
|
| | |
| | | GitBlitServer.main("--stop", "--shutdownPort", "" + shutdownPort);
|
| | |
|
| | | // Wait a few seconds for it to be running
|
| | | Thread.sleep(2500);
|
| | | Thread.sleep(5000);
|
| | | }
|
| | |
|
| | | @BeforeClass
|
| | |
| | |
|
| | | if (REPOSITORIES.exists() || REPOSITORIES.mkdirs()) {
|
| | | cloneOrFetch("helloworld.git", "https://github.com/git/hello-world.git");
|
| | | cloneOrFetch("ticgit.git", "https://github.com/jeffWelling/ticgit.git");
|
| | | cloneOrFetch("ticgit.git", "https://github.com/schacon/ticgit.git");
|
| | | cloneOrFetch("test/jgit.git", "https://github.com/eclipse/jgit.git");
|
| | | cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git");
|
| | | cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");
|
| | |
| | |
|
| | | @BeforeClass
|
| | | public static void startGitblit() throws Exception {
|
| | | deleteWorkingFolders();
|
| | | started.set(GitBlitSuite.startGitblit());
|
| | | }
|
| | |
|
| | |
| | | public static void stopGitblit() throws Exception {
|
| | | if (started.get()) {
|
| | | GitBlitSuite.stopGitblit();
|
| | | }
|
| | | deleteWorkingFolders();
|
| | | }
|
| | | }
|
| | |
|
| | | private static void deleteWorkingFolders() throws Exception {
|
| | | public static void deleteWorkingFolders() throws Exception {
|
| | | if (ticgitFolder.exists()) {
|
| | | FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE);
|
| | | }
|
| | |
| | | Set<String> links = new HashSet<String>();
|
| | | for (int i = 0; i < 2; i++) {
|
| | | List<FeedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url, "ticgit.git",
|
| | | "deving", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
|
| | | "master", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
|
| | | assertTrue(feed != null);
|
| | | assertTrue(feed.size() > 0);
|
| | | assertEquals(5, feed.size());
|
| | |
| | | .getTicket(repository, tickets.get(tickets.size() - 1).name);
|
| | | repository.close();
|
| | | assertNotNull(ticket);
|
| | | assertEquals(
|
| | | "1254123752_comments-on-ticgits-longer-than-5-lines-can-t-be-viewed-entirely_266",
|
| | | ticket.name);
|
| | | assertEquals("1206206148_add-attachment-to-ticket_138", ticket.name);
|
| | | }
|
| | | } |