Enable the "cannot clone a protected project" test

This commit is contained in:
Michael Walker 2018-02-07 10:10:16 +00:00
parent 994ad9a933
commit 63e28fede1

View file

@ -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;