Add stack trace prints and remove bugged git config.

This commit is contained in:
Winston Li
2015-02-22 00:45:19 +00:00
parent a91390dd37
commit 680c7fabf7
12 changed files with 6 additions and 151 deletions

View File

@@ -35,10 +35,6 @@ public class WLGitBridgeIntegrationTest {
put("canCloneMultipleRepositories", new HashMap<String, SnapshotAPIState>() {{
put("state", new SnapshotAPIStateBuilder(getResourceAsStream("/canCloneMultipleRepositories/state/state.json")).build());
}});
put("canPullAModifiedTexFile", new HashMap<String, SnapshotAPIState>() {{
put("base", new SnapshotAPIStateBuilder(getResourceAsStream("/canPullAModifiedTexFile/base/state.json")).build());
put("withModifiedTexFile", new SnapshotAPIStateBuilder(getResourceAsStream("/canPullAModifiedTexFile/withModifiedTexFile/state.json")).build());
}});
put("canPullADeletedTexFile", new HashMap<String, SnapshotAPIState>() {{
put("base", new SnapshotAPIStateBuilder(getResourceAsStream("/canPullADeletedTexFile/base/state.json")).build());
put("withDeletedTexFile", new SnapshotAPIStateBuilder(getResourceAsStream("/canPullADeletedTexFile/withDeletedTexFile/state.json")).build());
@@ -98,29 +94,6 @@ public class WLGitBridgeIntegrationTest {
assertTrue(FileUtil.gitDirectoriesAreEqual(getResource("/canCloneMultipleRepositories/state/testproj2"), testproj2.toPath()));
}
@Test
public void canPullAModifiedTexFile() throws IOException, GitAPIException {
MockSnapshotServer server = new MockSnapshotServer(3859, getResource("/canPullAModifiedTexFile").toFile());
server.start();
server.setState(states.get("canPullAModifiedTexFile").get("base"));
WLGitBridgeApplication wlgb = new WLGitBridgeApplication(new String[] {
makeConfigFile(33859, 3859)
});
wlgb.run();
folder.create();
File git = folder.newFolder();
Git base = Git.cloneRepository()
.setURI("http://127.0.0.1:33859/testproj.git")
.setDirectory(git)
.call();
assertTrue(FileUtil.gitDirectoriesAreEqual(getResource("/canPullAModifiedTexFile/base/testproj"), git.toPath()));
server.setState(states.get("canPullAModifiedTexFile").get("withModifiedTexFile"));
base.pull().call();
base.close();
wlgb.stop();
assertTrue(FileUtil.gitDirectoriesAreEqual(getResource("/canPullAModifiedTexFile/withModifiedTexFile/testproj"), git.toPath()));
}
@Test
public void canPullADeletedTexFile() throws IOException, GitAPIException {
MockSnapshotServer server = new MockSnapshotServer(3860, getResource("/canPullADeletedTexFile").toFile());