mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
Enable the "cannot clone a protected project" test
This commit is contained in:
+18
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user