Skip to content

Commit 798be87

Browse files
committed
tests: rename remote creation test suite
1 parent b5ae83b commit 798be87

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
#include "clar_libgit2.h"
22

3-
static git_remote *_remote;
43
static git_repository *_repo;
54
static git_config *_config;
65
static char url[] = "http://github.com/libgit2/libgit2.git";
76

8-
void test_network_remote_createthenload__initialize(void)
7+
void test_remote_create__initialize(void)
98
{
109
cl_fixture_sandbox("testrepo.git");
1110

1211
cl_git_pass(git_repository_open(&_repo, "testrepo.git"));
1312

1413
cl_git_pass(git_repository_config(&_config, _repo));
15-
cl_git_pass(git_config_set_string(_config, "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"));
16-
cl_git_pass(git_config_set_string(_config, "remote.origin.url", url));
17-
git_config_free(_config);
18-
19-
cl_git_pass(git_remote_lookup(&_remote, _repo, "origin"));
2014
}
2115

22-
void test_network_remote_createthenload__cleanup(void)
16+
void test_remote_create__cleanup(void)
2317
{
24-
git_remote_free(_remote);
25-
_remote = NULL;
18+
git_config_free(_config);
2619

2720
git_repository_free(_repo);
2821
_repo = NULL;
2922

3023
cl_fixture_cleanup("testrepo.git");
3124
}
3225

33-
void test_network_remote_createthenload__parsing(void)
26+
void test_remote_create__manual(void)
3427
{
35-
cl_assert_equal_s(git_remote_name(_remote), "origin");
36-
cl_assert_equal_s(git_remote_url(_remote), url);
28+
git_remote *remote;
29+
cl_git_pass(git_config_set_string(_config, "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"));
30+
cl_git_pass(git_config_set_string(_config, "remote.origin.url", url));
31+
32+
cl_git_pass(git_remote_lookup(&remote, _repo, "origin"));
33+
cl_assert_equal_s(git_remote_name(remote), "origin");
34+
cl_assert_equal_s(git_remote_url(remote), url);
35+
36+
git_remote_free(remote);
3737
}

0 commit comments

Comments
 (0)