summaryrefslogtreecommitdiff
path: root/tests/repo/open.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-05-15 10:56:28 -0700
committerRussell Belfer <rb@github.com>2014-05-15 10:56:28 -0700
commit8487e23797cef0284b592b5ef93eaacbac7196dc (patch)
treeda883f84114eceaf6e69f7b87e16e7aac45bbdad /tests/repo/open.c
parent4af0ef9690e9fdfc81afbeed7039d02a5f191001 (diff)
downloadlibgit2-rb/restore-search-paths.tar.gz
Better search path sandboxingrb/restore-search-paths
There are a number of tests that modify the global or system search paths during the tests. This adds a helper function to make it easier to restore those paths and makes sure that they are getting restored in a manner that preserves test isolation.
Diffstat (limited to 'tests/repo/open.c')
-rw-r--r--tests/repo/open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/repo/open.c b/tests/repo/open.c
index 190adff1c..637c785d5 100644
--- a/tests/repo/open.c
+++ b/tests/repo/open.c
@@ -298,7 +298,8 @@ void test_repo_open__no_config(void)
git_config *config;
cl_fixture_sandbox("empty_standard_repo");
- cl_git_pass(cl_rename("empty_standard_repo/.gitted", "empty_standard_repo/.git"));
+ cl_git_pass(cl_rename(
+ "empty_standard_repo/.gitted", "empty_standard_repo/.git"));
/* remove local config */
cl_git_pass(git_futils_rmdir_r(
@@ -325,7 +326,7 @@ void test_repo_open__no_config(void)
git_repository_free(repo);
cl_fixture_cleanup("empty_standard_repo");
- git_sysdir_global_shutdown();
+ cl_sandbox_set_search_path_defaults();
}
void test_repo_open__force_bare(void)