Acceptance tests: Always check error after SshSession.exec()

The GitUtil.createProject() method in particular was failing silently
in a surprising number of cases. Fix all of these, and add the error
message to the AssertionError in cases where it was checked.

Change-Id: Ibca7881edfe8be583a19cc08f2b942bf4a9bbfc3
This commit is contained in:
Dave Borowitz
2014-08-06 09:46:49 -07:00
parent cf31c84e8a
commit 2148bf294d
7 changed files with 12 additions and 69 deletions

View File

@@ -100,6 +100,10 @@ public class GitUtil {
b.append("\"");
}
s.exec(b.toString());
if (s.hasError()) {
throw new IllegalStateException(
"gerrit create-project returned error: " + s.getError());
}
}
public static Git cloneProject(String url) throws GitAPIException, IOException {