mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
ssh_exec: use GIT_SSH_COMMAND in tests
We specify additional arguments to the ssh executable; as a result, we specify arguments with `GIT_SSH_COMMAND`.
This commit is contained in:
@@ -105,13 +105,13 @@ void test_online_clone__initialize(void)
|
||||
_orig_https_proxy = cl_getenv("HTTPS_PROXY");
|
||||
_orig_no_proxy = cl_getenv("NO_PROXY");
|
||||
|
||||
_orig_ssh_cmd = cl_getenv("GIT_SSH");
|
||||
_orig_ssh_cmd = cl_getenv("GIT_SSH_COMMAND");
|
||||
_ssh_cmd = cl_getenv("GITTEST_SSH_CMD");
|
||||
|
||||
if (_ssh_cmd)
|
||||
cl_setenv("GIT_SSH", _ssh_cmd);
|
||||
cl_setenv("GIT_SSH_COMMAND", _ssh_cmd);
|
||||
else
|
||||
cl_setenv("GIT_SSH", NULL);
|
||||
cl_setenv("GIT_SSH_COMMAND", NULL);
|
||||
|
||||
if (_remote_expectcontinue)
|
||||
git_libgit2_opts(GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE, 1);
|
||||
@@ -174,7 +174,7 @@ void test_online_clone__cleanup(void)
|
||||
git__free(_orig_https_proxy);
|
||||
git__free(_orig_no_proxy);
|
||||
|
||||
cl_setenv("GIT_SSH", _orig_ssh_cmd);
|
||||
cl_setenv("GIT_SSH_COMMAND", _orig_ssh_cmd);
|
||||
git__free(_orig_ssh_cmd);
|
||||
|
||||
git__free(_ssh_cmd);
|
||||
|
||||
@@ -376,13 +376,13 @@ void test_online_push__initialize(void)
|
||||
_remote_push_options = cl_getenv("GITTEST_PUSH_OPTIONS");
|
||||
_remote = NULL;
|
||||
|
||||
_orig_ssh_cmd = cl_getenv("GIT_SSH");
|
||||
_orig_ssh_cmd = cl_getenv("GIT_SSH_COMMAND");
|
||||
_ssh_cmd = cl_getenv("GITTEST_SSH_CMD");
|
||||
|
||||
if (_ssh_cmd)
|
||||
cl_setenv("GIT_SSH", _ssh_cmd);
|
||||
cl_setenv("GIT_SSH_COMMAND", _ssh_cmd);
|
||||
else
|
||||
cl_setenv("GIT_SSH", NULL);
|
||||
cl_setenv("GIT_SSH_COMMAND", NULL);
|
||||
|
||||
/* Skip the test if we're missing the remote URL */
|
||||
if (!_remote_url)
|
||||
@@ -439,6 +439,7 @@ void test_online_push__cleanup(void)
|
||||
git__free(_remote_expectcontinue);
|
||||
git__free(_remote_push_options);
|
||||
|
||||
cl_setenv("GIT_SSH_COMMAND", _orig_ssh_cmd);
|
||||
git__free(_orig_ssh_cmd);
|
||||
git__free(_ssh_cmd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user