summaryrefslogtreecommitdiff
path: root/test/other_tools/git_operations/git_repo_remote.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/other_tools/git_operations/git_repo_remote.test.cpp')
-rw-r--r--test/other_tools/git_operations/git_repo_remote.test.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/other_tools/git_operations/git_repo_remote.test.cpp b/test/other_tools/git_operations/git_repo_remote.test.cpp
index 6850355e..1cdf643d 100644
--- a/test/other_tools/git_operations/git_repo_remote.test.cpp
+++ b/test/other_tools/git_operations/git_repo_remote.test.cpp
@@ -244,11 +244,12 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") {
CHECK_FALSE(
*repo_fetch_all->CheckCommitExists(kRootCommit, logger));
- // create path for tmp repo to use for fetch
+ // create tmp dir to use for fetch
auto tmp_path_fetch_all = TestUtils::GetRepoPath();
- // fetch with base refspecs
+ REQUIRE(FileSystemManager::CreateDirectory(tmp_path_fetch_all));
+ // fetch all with base refspecs
REQUIRE(repo_fetch_all->FetchViaTmpRepo(
- tmp_path_fetch_all, *repo_path, std::nullopt, logger));
+ tmp_path_fetch_all, *repo_path, std::nullopt, {}, logger));
// check commit is there after fetch
CHECK(*repo_fetch_all->CheckCommitExists(kRootCommit, logger));
@@ -265,11 +266,13 @@ TEST_CASE("Single-threaded fake repository operations", "[git_repo_remote]") {
CHECK_FALSE(
*repo_fetch_wRefspec->CheckCommitExists(kRootCommit, logger));
- // create path for tmp repo to use for fetch
+ // create tmp dir to use for fetch
auto tmp_path_fetch_wRefspec = TestUtils::GetRepoPath();
+ REQUIRE(
+ FileSystemManager::CreateDirectory(tmp_path_fetch_wRefspec));
// fetch all
REQUIRE(repo_fetch_wRefspec->FetchViaTmpRepo(
- tmp_path_fetch_wRefspec, *repo_path, "master", logger));
+ tmp_path_fetch_wRefspec, *repo_path, "master", {}, logger));
// check commit is there after fetch
CHECK(*repo_fetch_wRefspec->CheckCommitExists(kRootCommit, logger));
@@ -345,24 +348,30 @@ TEST_CASE("Multi-threaded fake repository operations", "[git_repo_remote]") {
// something
} break;
case 1: {
- // create path for tmp repo to use for fetch
+ // create tmp dir to use for fetch
auto tmp_path_fetch_all = TestUtils::GetRepoPath();
+ REQUIRE(FileSystemManager::CreateDirectory(
+ tmp_path_fetch_all));
// fetch with base refspecs
CHECK(
target_repo->FetchViaTmpRepo(tmp_path_fetch_all,
*remote_repo_path,
std::nullopt,
+ {},
logger));
} break;
case 2: {
- // create path for tmp repo to use for fetch
+ // create tmp dir to use for fetch
auto tmp_path_fetch_wRefspec =
TestUtils::GetRepoPath();
+ REQUIRE(FileSystemManager::CreateDirectory(
+ tmp_path_fetch_wRefspec));
// fetch specific branch
CHECK(target_repo->FetchViaTmpRepo(
tmp_path_fetch_wRefspec,
*remote_repo_path,
"master",
+ {},
logger));
} break;
case 3: {