@@ -25,6 +25,7 @@ public class GitUtilitiesTests {
2525
2626 public static final String VALID_URL = "https://github.com/FHIR/fhir-core-examples.git" ;
2727 public static final String USERNAME_AND_TOKEN_URL = "https://username:token@github.com/FHIR/fhir-core-examples.git" ;
28+ public static final String SSH_URL = "git@github.com:FHIR/fhir-core-examples.git" ;
2829 public static final String NORMAL_BRANCH = "normal-branch" ;
2930 public static final String WORKTREE_BRANCH = "branch-a" ;
3031
@@ -98,7 +99,8 @@ public void testGitStatusWhenNotGitDirectory() throws IOException {
9899 @ CsvSource (value = {
99100 VALID_URL +"," +VALID_URL ,
100101 "whwehwhasdlksdjsdf,''" ,
101- USERNAME_AND_TOKEN_URL +"," + VALID_URL })
102+ USERNAME_AND_TOKEN_URL +"," + VALID_URL ,
103+ SSH_URL +"," +SSH_URL })
102104 void testGetGitSource (String url , String expected ) throws IOException , InterruptedException {
103105 File gitRoot = initiateGitDirectory ();
104106 createOriginURL (gitRoot , url );
@@ -110,7 +112,9 @@ void testGetGitSource(String url, String expected) throws IOException, Interrupt
110112 @ CsvSource (value = {
111113 VALID_URL +"," +VALID_URL ,
112114 "whwehwhasdlksdjsdf,NULL" ,
113- USERNAME_AND_TOKEN_URL +"," +VALID_URL }, nullValues ={"NULL" })
115+ USERNAME_AND_TOKEN_URL +"," +VALID_URL ,
116+ SSH_URL +"," +SSH_URL ,
117+ "deploy@gitlab.example.com:org/repo.git,deploy@gitlab.example.com:org/repo.git" }, nullValues ={"NULL" })
114118 public void testGetURLWithNoUserInfo (String url , String expected ) {
115119 String result = GitUtilities .getURLWithNoUserInfo (url , "test" );
116120 assertThat (result ).isEqualTo (expected );
0 commit comments