summaryrefslogtreecommitdiff
path: root/tests/online
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-09-16 01:25:53 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-16 17:02:28 +0200
commit0fef38999abc74b8237971f96295f461631d9d1d (patch)
tree6f26d1bd650140f1c4add4bf944263cd8e058d70 /tests/online
parentbf8756d6a2c42dc77b8a2de814a12e2ceb4487fd (diff)
parent910cd2daa6af0f3af97d283eb4c6a0452688d067 (diff)
downloadlibgit2-0fef38999abc74b8237971f96295f461631d9d1d.tar.gz
Merge remote-tracking branch 'upstream/master' into cmn/host-cert-info
Diffstat (limited to 'tests/online')
-rw-r--r--tests/online/clone.c9
-rw-r--r--tests/online/fetchhead.c12
-rw-r--r--tests/online/push.c3
3 files changed, 22 insertions, 2 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 2e51364f6..f88a4d611 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -384,6 +384,9 @@ void test_online_clone__ssh_auth_methods(void)
{
int with_user;
+#ifndef GIT_SSH
+ clar__skip();
+#endif
g_options.remote_callbacks.credentials = check_ssh_auth_methods;
g_options.remote_callbacks.payload = &with_user;
@@ -436,6 +439,9 @@ void test_online_clone__ssh_with_paths(void)
const char *remote_url = cl_getenv("GITTEST_REMOTE_URL");
const char *remote_user = cl_getenv("GITTEST_REMOTE_USER");
+#ifndef GIT_SSH
+ clar__skip();
+#endif
if (!remote_url || !remote_user || strncmp(remote_url, "ssh://", 5) != 0)
clar__skip();
@@ -459,6 +465,9 @@ static int cred_foo_bar(git_cred **cred, const char *url, const char *username_f
void test_online_clone__ssh_cannot_change_username(void)
{
+#ifndef GIT_SSH
+ clar__skip();
+#endif
g_options.remote_callbacks.credentials = cred_foo_bar;
cl_git_fail(git_clone(&g_repo, "ssh://git@github.com/libgit2/TestGitRepository", "./foo", &g_options));
diff --git a/tests/online/fetchhead.c b/tests/online/fetchhead.c
index 0b3f20db1..3f27e1331 100644
--- a/tests/online/fetchhead.c
+++ b/tests/online/fetchhead.c
@@ -67,6 +67,11 @@ static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fet
void test_online_fetchhead__wildcard_spec(void)
{
fetchhead_test_clone();
+ fetchhead_test_fetch(NULL, FETCH_HEAD_WILDCARD_DATA2);
+ cl_git_pass(git_tag_delete(g_repo, "annotated_tag"));
+ cl_git_pass(git_tag_delete(g_repo, "blob"));
+ cl_git_pass(git_tag_delete(g_repo, "commit_tree"));
+ cl_git_pass(git_tag_delete(g_repo, "nearly-dangling"));
fetchhead_test_fetch(NULL, FETCH_HEAD_WILDCARD_DATA);
}
@@ -87,5 +92,12 @@ void test_online_fetchhead__no_merges(void)
cl_git_pass(git_config_delete_entry(config, "branch.master.merge"));
git_config_free(config);
+ fetchhead_test_fetch(NULL, FETCH_HEAD_NO_MERGE_DATA2);
+ cl_git_pass(git_tag_delete(g_repo, "annotated_tag"));
+ cl_git_pass(git_tag_delete(g_repo, "blob"));
+ cl_git_pass(git_tag_delete(g_repo, "commit_tree"));
+ cl_git_pass(git_tag_delete(g_repo, "nearly-dangling"));
fetchhead_test_fetch(NULL, FETCH_HEAD_NO_MERGE_DATA);
+ cl_git_pass(git_tag_delete(g_repo, "commit_tree"));
+ fetchhead_test_fetch(NULL, FETCH_HEAD_NO_MERGE_DATA3);
}
diff --git a/tests/online/push.c b/tests/online/push.c
index 4d88bdf7f..70ec705fe 100644
--- a/tests/online/push.c
+++ b/tests/online/push.c
@@ -864,7 +864,6 @@ void test_online_push__notes(void)
push_status exp_stats[] = { { "refs/notes/commits", 1 } };
expected_ref exp_refs[] = { { "refs/notes/commits", &expected_oid } };
const char *specs_del[] = { ":refs/notes/commits" };
- expected_ref exp_refs_del[] = { };
git_oid_fromstr(&expected_oid, "8461a99b27b7043e58ff6e1f5d2cf07d282534fb");
@@ -882,7 +881,7 @@ void test_online_push__notes(void)
do_push(specs_del, ARRAY_SIZE(specs_del),
exp_stats, 1,
- exp_refs_del, ARRAY_SIZE(exp_refs_del), 0, 0, 0);
+ NULL, 0, 0, 0, 0);
git_signature_free(signature);
}