Skip to content

Commit 66ba3eb

Browse files
committed
Remove username from SSH URL in tests
For the tests were we test prompting for the username we should make sure not to include the username in the URL or as the username_ptr as this will provide a default value. Will only be a problem for us when prompting for a username is the default setting.
1 parent 7e143bb commit 66ba3eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/libgit2.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,10 +1644,11 @@ mktempdir() do dir
16441644
end
16451645

16461646
# SSH requires username
1647+
url_no_username = "github.com:test/package.jl"
16471648
ssh_u_ex = quote
16481649
include($LIBGIT2_HELPER_PATH)
16491650
valid_cred = SSHCredentials($username, "", $valid_key, $(valid_key * ".pub"))
1650-
credential_loop(valid_cred, $url)
1651+
credential_loop(valid_cred, $url_no_username)
16511652
end
16521653

16531654
# Note: We cannot use the default ~/.ssh/id_rsa for tests since we cannot be
@@ -1748,7 +1749,7 @@ mktempdir() do dir
17481749
ssh_user_empty_ex = quote
17491750
include($LIBGIT2_HELPER_PATH)
17501751
valid_cred = LibGit2.SSHCredentials($username, "", $valid_key, $(valid_key * ".pub"))
1751-
credential_loop(valid_cred, $url, "")
1752+
credential_loop(valid_cred, $url_no_username, "")
17521753
end
17531754

17541755
challenges = [

0 commit comments

Comments
 (0)