test: actually test return code

Instead of testing that the call failed, ensure that we're getting the
return code that we expect. This ensures that the return code is plumbed
through the indexer fully.
This commit is contained in:
Edward Thomson
2024-01-23 14:27:22 +00:00
parent fb0f09276f
commit c15a94695f

View File

@@ -191,9 +191,8 @@ void test_clone_nonetwork__can_cancel_clone_in_fetch(void)
g_options.fetch_opts.callbacks.transfer_progress =
clone_cancel_fetch_transfer_progress_cb;
cl_git_fail_with(git_clone(
&g_repo, cl_git_fixture_url("testrepo.git"), "./foo", &g_options),
-54321);
cl_git_fail_with(-54321, git_clone(
&g_repo, cl_git_fixture_url("testrepo.git"), "./foo", &g_options));
cl_assert(!g_repo);
cl_assert(!git_fs_path_exists("foo/readme.txt"));