mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 16:52:33 +00:00
Enable the "cannot clone a protected project" test
This commit is contained in:
parent
994ad9a933
commit
63e28fede1
1 changed files with 18 additions and 0 deletions
|
@ -733,6 +733,24 @@ public class WLGitBridgeIntegrationTest {
|
|||
wlgb.stop();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cannotCloneAProtectedProject() throws IOException, GitAPIException, InterruptedException {
|
||||
int gitBridgePort = 33883;
|
||||
int mockServerPort = 3883;
|
||||
|
||||
MockSnapshotServer server = new MockSnapshotServer(mockServerPort, getResource("/cannotCloneAProtectedProject").toFile());
|
||||
server.start();
|
||||
server.setState(states.get("cannotCloneAProtectedProject").get("state"));
|
||||
GitBridgeApp wlgb = new GitBridgeApp(new String[] {
|
||||
makeConfigFile(gitBridgePort, mockServerPort)
|
||||
});
|
||||
|
||||
wlgb.run();
|
||||
Process gitProcess = runtime.exec("git clone http://127.0.0.1:" + gitBridgePort + "/testproj.git", null, dir);
|
||||
wlgb.stop();
|
||||
assertNotEquals(0, gitProcess.waitFor());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cannotCloneADisabledProject() throws IOException, GitAPIException, InterruptedException {
|
||||
int gitBridgePort = 33879;
|
||||
|
|
Loading…
Add table
Reference in a new issue