diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-10 21:25:05 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-10 22:15:47 -0500 |
commit | 3f944f233964dbb5b52b9c119254a518d721ba95 (patch) | |
tree | eda6f6fbb49f462fe24a2e0f5b642a701ac70059 /tests/online/fetchhead.c | |
parent | e2e3f3e4cde7871f86eabacc6a639439b70a8fc7 (diff) | |
download | libgit2-ethomson/test_https.tar.gz |
online: test with https instead of git protocolethomson/test_https
GitHub is removing support for the unauthenticated git protocol; test
with the https protocol.
Diffstat (limited to 'tests/online/fetchhead.c')
-rw-r--r-- | tests/online/fetchhead.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/online/fetchhead.c b/tests/online/fetchhead.c index 30cce3a90..1b66c528e 100644 --- a/tests/online/fetchhead.c +++ b/tests/online/fetchhead.c @@ -5,7 +5,7 @@ #include "../fetchhead/fetchhead_data.h" #include "git2/clone.h" -#define LIVE_REPO_URL "git://github.com/libgit2/TestGitRepository" +#define LIVE_REPO_URL "https://github.com/libgit2/TestGitRepository" static git_repository *g_repo; static git_clone_options g_options; @@ -53,7 +53,6 @@ static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fet git_remote *remote; git_fetch_options fetch_opts = GIT_FETCH_OPTIONS_INIT; git_str fetchhead_buf = GIT_STR_INIT; - int equals = 0; git_strarray array, *active_refs = NULL; cl_git_pass(git_remote_lookup(&remote, g_repo, "origin")); @@ -70,11 +69,8 @@ static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fet cl_git_pass(git_futils_readbuffer(&fetchhead_buf, "./foo/.git/FETCH_HEAD")); - equals = (strcmp(fetchhead_buf.ptr, expected_fetchhead) == 0); - + cl_assert_equal_s(fetchhead_buf.ptr, expected_fetchhead); git_str_dispose(&fetchhead_buf); - - cl_assert(equals); } void test_online_fetchhead__wildcard_spec(void) |