Skip to content

Commit

Permalink
Throw GitException as expected in GitClientTest
Browse files Browse the repository at this point in the history
When command line git does not support remote symbolic references, the
test intentionally exits early.  In order to pass the test, it needs
to throw the expected exception instead of simply returning. Throw the
expected exception.

Allows tests to run successfully on CentOS 7 with git 1.8.3.
  • Loading branch information
MarkEWaite committed Sep 26, 2020
1 parent d3e1716 commit 2248838
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@ public void testgetRemoteSymbolicReferences_with_non_default_HEAD() throws Excep
@Test(expected = GitException.class)
public void testgetRemoteSymbolicReferences_URI_Syntax() throws Exception {
if (!CLI_GIT_SUPPORTS_SYMREF) {
return;
throw new GitException("Skipping JGit tests in testgetRemoteSymbolicReferences_URI_Syntax");
}
gitClient.getRemoteSymbolicReferences("error: invalid repo URL", Constants.HEAD);
}
Expand Down

0 comments on commit 2248838

Please sign in to comment.