mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add test for pulling ignored file
This commit is contained in:
parent
c6cfd51fb4
commit
de23035e80
1 changed files with 18 additions and 0 deletions
|
@ -1027,6 +1027,24 @@ public class WLGitBridgeIntegrationTest {
|
||||||
assertTrue(f.exists());
|
assertTrue(f.exists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void canPullIgnoredFileFromOverleaf() throws IOException, InterruptedException {
|
||||||
|
int gitBridgePort = 33892;
|
||||||
|
int mockServerPort = 3892;
|
||||||
|
server = new MockSnapshotServer(mockServerPort, getResource("/canPullIgnoredForceAddedFile").toFile());
|
||||||
|
server.start();
|
||||||
|
server.setState(states.get("canPullIgnoredForceAddedFile").get("base"));
|
||||||
|
wlgb = new GitBridgeApp(new String[] {
|
||||||
|
makeConfigFile(gitBridgePort, mockServerPort)
|
||||||
|
});
|
||||||
|
wlgb.run();
|
||||||
|
File testProjDir = gitClone("testproj", gitBridgePort, dir);
|
||||||
|
server.setState(states.get("canPullIgnoredForceAddedFile").get("withUpdatedMainFile"));
|
||||||
|
gitPull(testProjDir);
|
||||||
|
File f = new File(testProjDir.getPath() + "/sub/one.txt");
|
||||||
|
assertTrue(f.exists());
|
||||||
|
}
|
||||||
|
|
||||||
private String makeConfigFile(
|
private String makeConfigFile(
|
||||||
int port,
|
int port,
|
||||||
int apiPort
|
int apiPort
|
||||||
|
|
Loading…
Reference in a new issue