Store repository id in native config file

Hooks can read this repository type dependant config file and handle
the changes for the correct repository id
This commit is contained in:
René Pfeuffer
2018-11-26 17:22:17 +01:00
parent 6b663de7dd
commit 00ab764dab
17 changed files with 204 additions and 175 deletions

View File

@@ -23,9 +23,7 @@ public class HgHookCallbackServletTest {
@Test
public void shouldExtractCorrectRepositoryId() throws ServletException, IOException {
HgRepositoryHandler handler = mock(HgRepositoryHandler.class);
RepositoryDAO repositoryDAO = mock(RepositoryDAO.class);
when(repositoryDAO.getRepositoryForDirectory(new File("/tmp/hg/12345"))).thenReturn(new Repository("12345", "git", "space", "name"));
HgHookCallbackServlet servlet = new HgHookCallbackServlet(null, handler, null, null, repositoryDAO);
HgHookCallbackServlet servlet = new HgHookCallbackServlet(null, handler, null, null);
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);