Commit 10fbb5c9 by Edward Thomson

ssh: only test callbacks for libssh2

There are no custom callbacks for OpenSSH; don't test them.
parent cf133a82
......@@ -653,7 +653,7 @@ void test_online_clone__ssh_auth_methods(void)
{
int with_user;
#ifndef GIT_SSH
#ifndef GIT_SSH_LIBSSH2
clar__skip();
#endif
g_options.fetch_opts.callbacks.credentials = check_ssh_auth_methods;
......@@ -796,6 +796,7 @@ void test_online_clone__ssh_cannot_change_username(void)
#ifndef GIT_SSH_LIBSSH2
clar__skip();
#endif
g_options.fetch_opts.callbacks.credentials = cred_foo_bar;
cl_git_fail(git_clone(&g_repo, "ssh://git@github.com/libgit2/TestGitRepository", "./foo", &g_options));
......@@ -837,6 +838,10 @@ static int ssh_certificate_check(git_cert *cert, int valid, const char *host, vo
void test_online_clone__ssh_cert(void)
{
#ifndef GIT_SSH_LIBSSH2
cl_skip();
#endif
g_options.fetch_opts.callbacks.certificate_check = ssh_certificate_check;
if (!_remote_ssh_fingerprint)
......@@ -911,7 +916,7 @@ void test_online_clone__certificate_invalid(void)
cl_git_fail_with(GIT_ECERTIFICATE,
git_clone(&g_repo, "https://github.com/libgit2/TestGitRepository", "./foo", &g_options));
#ifdef GIT_SSH
#ifdef GIT_SSH_LIBSSH2
cl_git_fail_with(GIT_ECERTIFICATE,
git_clone(&g_repo, "ssh://github.com/libgit2/TestGitRepository", "./foo", &g_options));
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment