diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-01-23 14:53:03 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-01-24 15:47:31 +0100 |
commit | 7f98d19a8c6a6697e246338d2c3a0640cd9528c8 (patch) | |
tree | 9013ea406c9d945ef0a622a89bd38b3830fa82b5 /test/other_tools/git_operations | |
parent | 7c3313a3baaa3695081a9c17b521931877babad6 (diff) | |
download | justbuild-7f98d19a8c6a6697e246338d2c3a0640cd9528c8.tar.gz |
Just-MR: Remove obsolete GET_BRANCH_REFNAME critical Git operation
As now all remote Git operations in GitRepo require at most just
the branch name, there is no more need to inquire the repository
about branch refspecs.
Diffstat (limited to 'test/other_tools/git_operations')
-rw-r--r-- | test/other_tools/git_operations/critical_git_ops.test.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/test/other_tools/git_operations/critical_git_ops.test.cpp b/test/other_tools/git_operations/critical_git_ops.test.cpp index 7c74d352..c7fedda0 100644 --- a/test/other_tools/git_operations/critical_git_ops.test.cpp +++ b/test/other_tools/git_operations/critical_git_ops.test.cpp @@ -128,10 +128,6 @@ TEST_CASE("Crtitical git operations", "[critical_git_op_map]") { // 5. Get head commit -> needs a repo with a commit auto path_get_head_id = TestUtilsMP::CreateTestRepoWithCheckout(*prefix); REQUIRE(path_get_head_id); - // 6. Get local branch refname -> needs a repo with a commit - auto path_get_branch_refname = - TestUtilsMP::CreateTestRepoWithCheckout(*prefix); - REQUIRE(path_get_branch_refname); // create the map auto crit_op_guard = std::make_shared<CriticalGitOpGuard>(); @@ -141,9 +137,9 @@ TEST_CASE("Crtitical git operations", "[critical_git_op_map]") { // should retrieve the value from the map, not call the operation again. // helper lists const std::vector<size_t> ops_all{ - 0, 1, 2, 3, 4, 5}; // indices of all ops tested + 0, 1, 2, 3, 4}; // indices of all ops tested const std::vector<size_t> ops_with_result{ - 0, 4, 5}; // indices of ops that return a non-empty string + 0, 4}; // indices of ops that return a non-empty string // Add to the map all ops multiple times for ([[maybe_unused]] auto const& i : {0, 0, 0}) { // replace once ranges are available @@ -189,13 +185,7 @@ TEST_CASE("Crtitical git operations", "[critical_git_op_map]") { "", // git_hash "", // branch }, - GitOpType::GET_HEAD_ID}, - GitOpKey{GitOpParams{ - *path_get_branch_refname, // target_path - "", // git_hash - "master", // branch - }, - GitOpType::GET_BRANCH_REFNAME}}, + GitOpType::GET_HEAD_ID}}, [&ops_all, &ops_with_result](auto const& values) { // check operations for (size_t const& i : ops_all) { |