mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02:00
Add stack trace prints and remove bugged git config.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user