Skip to content

Commit

Permalink
Fixup to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Aug 3, 2017
1 parent 4833b89 commit c95792e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1632,15 +1632,18 @@ mktempdir() do dir
@test auth_attempts == 1
end

# TODO: Tests are currently broken. Credential callback prompts for:
# "Passphrase for :"
# Explicitly setting these env variables to be empty means the user will be
# given a prompt with no defaults set.
withenv("SSH_KEY_PATH" => nothing,
"SSH_PUB_KEY_PATH" => nothing,
"SSH_KEY_PASS" => nothing,
(Sys.iswindows() ? "USERPROFILE" : "HOME") => tempdir()) do

# Set the USERPROFILE / HOME above to be a directory that does not contain
# the "~/.ssh/id_rsa" file. If this file exists the credential callback
# will default to use this private key instead of triggering a prompt.
@test !isfile(joinpath(homedir(), ".ssh", "id_rsa"))

# User provides valid credentials
challenges = [
"Private key location for '[email protected]':" => "$valid_key\n",
Expand Down

0 comments on commit c95792e

Please sign in to comment.