tests: rename remote creation test suite
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
diff --git a/tests/network/remote/createthenload.c b/tests/network/remote/createthenload.c
deleted file mode 100644
index f811f3c..0000000
--- a/tests/network/remote/createthenload.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "clar_libgit2.h"
-
-static git_remote *_remote;
-static git_repository *_repo;
-static git_config *_config;
-static char url[] = "http://github.com/libgit2/libgit2.git";
-
-void test_network_remote_createthenload__initialize(void)
-{
- cl_fixture_sandbox("testrepo.git");
-
- cl_git_pass(git_repository_open(&_repo, "testrepo.git"));
-
- cl_git_pass(git_repository_config(&_config, _repo));
- cl_git_pass(git_config_set_string(_config, "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"));
- cl_git_pass(git_config_set_string(_config, "remote.origin.url", url));
- git_config_free(_config);
-
- cl_git_pass(git_remote_lookup(&_remote, _repo, "origin"));
-}
-
-void test_network_remote_createthenload__cleanup(void)
-{
- git_remote_free(_remote);
- _remote = NULL;
-
- git_repository_free(_repo);
- _repo = NULL;
-
- cl_fixture_cleanup("testrepo.git");
-}
-
-void test_network_remote_createthenload__parsing(void)
-{
- cl_assert_equal_s(git_remote_name(_remote), "origin");
- cl_assert_equal_s(git_remote_url(_remote), url);
-}
diff --git a/tests/remote/create.c b/tests/remote/create.c
new file mode 100644
index 0000000..0aa0f83
--- /dev/null
+++ b/tests/remote/create.c
@@ -0,0 +1,37 @@
+#include "clar_libgit2.h"
+
+static git_repository *_repo;
+static git_config *_config;
+static char url[] = "http://github.com/libgit2/libgit2.git";
+
+void test_remote_create__initialize(void)
+{
+ cl_fixture_sandbox("testrepo.git");
+
+ cl_git_pass(git_repository_open(&_repo, "testrepo.git"));
+
+ cl_git_pass(git_repository_config(&_config, _repo));
+}
+
+void test_remote_create__cleanup(void)
+{
+ git_config_free(_config);
+
+ git_repository_free(_repo);
+ _repo = NULL;
+
+ cl_fixture_cleanup("testrepo.git");
+}
+
+void test_remote_create__manual(void)
+{
+ git_remote *remote;
+ cl_git_pass(git_config_set_string(_config, "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"));
+ cl_git_pass(git_config_set_string(_config, "remote.origin.url", url));
+
+ cl_git_pass(git_remote_lookup(&remote, _repo, "origin"));
+ cl_assert_equal_s(git_remote_name(remote), "origin");
+ cl_assert_equal_s(git_remote_url(remote), url);
+
+ git_remote_free(remote);
+}