Skip to content

Commit c2c95ad

Browse files
committed
tests: online::clone: use URL of test server
All our tests running against a local SSH server usually read the server's URL from environment variables. But online::clone::ssh_cert test fails to do so and instead always connects to "ssh://localhost/foo". This assumption breaks whenever the SSH server is not running on the standard port, e.g. when it is running as a user. Fix the issue by using the URL provided by the environment.
1 parent 15e1193 commit c2c95ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/online/clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void test_online_clone__ssh_cert(void)
547547
if (!_remote_ssh_fingerprint)
548548
cl_skip();
549549

550-
cl_git_fail_with(GIT_EUSER, git_clone(&g_repo, "ssh://localhost/foo", "./foo", &g_options));
550+
cl_git_fail_with(GIT_EUSER, git_clone(&g_repo, _remote_url, "./foo", &g_options));
551551
}
552552

553553
static char *read_key_file(const char *path)

0 commit comments

Comments
 (0)