Skip to content

Commit c28ebdf

Browse files
committed
Revert "tests: validate host and port for ssh tests when non-standard"
This reverts commit 43e84e2.
1 parent 5adde38 commit c28ebdf

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/libgit2/online/clone.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -787,19 +787,10 @@ static int ssh_certificate_check(git_cert *cert, int valid, const char *host, vo
787787
{
788788
git_cert_hostkey *key;
789789
git_oid expected = GIT_OID_SHA1_ZERO, actual = GIT_OID_SHA1_ZERO;
790-
git_str expected_host = GIT_STR_INIT;
791-
git_net_url parsed_url = GIT_NET_URL_INIT;
792790

793791
GIT_UNUSED(valid);
794792
GIT_UNUSED(payload);
795793

796-
cl_git_pass(git_net_url_parse_standard_or_scp(&parsed_url, _remote_url));
797-
cl_git_pass(git_str_printf(&expected_host, "%s%s%s",
798-
parsed_url.host,
799-
git_net_url_is_default_port(&parsed_url) ? "" : ":",
800-
git_net_url_is_default_port(&parsed_url) ? "" : parsed_url.port));
801-
cl_assert_equal_s(expected_host.ptr, host);
802-
803794
cl_assert(_remote_ssh_fingerprint);
804795

805796
cl_git_pass(git_oid__fromstrp(&expected, _remote_ssh_fingerprint, GIT_OID_SHA1));
@@ -821,8 +812,7 @@ static int ssh_certificate_check(git_cert *cert, int valid, const char *host, vo
821812

822813
cl_assert(!memcmp(&expected, &actual, 20));
823814

824-
git_net_url_dispose(&parsed_url);
825-
git_str_dispose(&expected_host);
815+
cl_assert_equal_s("localhost", host);
826816

827817
return GIT_EUSER;
828818
}

0 commit comments

Comments
 (0)