ssh: only test callbacks for libssh2

There are no custom callbacks for OpenSSH; don't test them.
This commit is contained in:
Edward Thomson
2023-05-18 10:47:13 +01:00
parent cf133a8221
commit 10fbb5c940

View File

@@ -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