Skip to content

Commit

Permalink
test: make the check_connection test use the local ssh setup
Browse files Browse the repository at this point in the history
With GitHub shutting down user/pass for Git access, let's take the opportunity
to fix this failing test by using our own local setup instead of having to write
down a password to an account.
  • Loading branch information
carlosmn committed Sep 1, 2021
1 parent 063b32d commit b4199b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/remote_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def test_remote_check_connection_push
end

def test_remote_check_connection_push_credentials
skip_if_unreachable
remote = @repo.remotes.create_anonymous('https://github.com/libgit2-push-test/libgit2-push-test.git')
credentials = Rugged::Credentials::UserPassword.new(username: "libgit2-push-test", password: "123qwe123")
assert remote.check_connection(:push, credentials: credentials)
skip unless Rugged.features.include?(:ssh) && ssh_creds?

remote = @repo.remotes.create_anonymous(url)
assert remote.check_connection(:push, credentials: ssh_key_credential)
end

def test_remote_check_connection_invalid
Expand Down

0 comments on commit b4199b6

Please sign in to comment.