From dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 5 Jul 2024 17:27:13 +0200 Subject: Pass HashFunction to ArtifactDigest::Create --- .../buildtool/execution_api/execution_service/cas_server.test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/buildtool/execution_api/execution_service/cas_server.test.cpp') diff --git a/test/buildtool/execution_api/execution_service/cas_server.test.cpp b/test/buildtool/execution_api/execution_service/cas_server.test.cpp index f0fcf949..845d94aa 100644 --- a/test/buildtool/execution_api/execution_service/cas_server.test.cpp +++ b/test/buildtool/execution_api/execution_service/cas_server.test.cpp @@ -17,6 +17,7 @@ #include "catch2/catch_test_macros.hpp" #include "gsl/gsl" #include "src/buildtool/common/artifact_digest.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/execution_service/cas_server.hpp" #include "src/buildtool/file_system/git_repo.hpp" #include "src/buildtool/file_system/object_type.hpp" @@ -57,15 +58,16 @@ TEST_CASE("CAS Service: upload incomplete tree", "[execution_service]") { auto empty_entries = GitRepo::tree_entries_t{}; auto empty_tree = GitRepo::CreateShallowTree(empty_entries); REQUIRE(empty_tree); - auto empty_tree_digest = - ArtifactDigest::Create(empty_tree->second); + auto empty_tree_digest = ArtifactDigest::Create( + HashFunction::Instance(), empty_tree->second); // Create a tree containing the empty tree. auto entries = GitRepo::tree_entries_t{}; entries[empty_tree->first].emplace_back("empty_tree", ObjectType::Tree); auto tree = GitRepo::CreateShallowTree(entries); REQUIRE(tree); - auto tree_digest = ArtifactDigest::Create(tree->second); + auto tree_digest = ArtifactDigest::Create( + HashFunction::Instance(), tree->second); // Upload tree. The tree invariant is violated, thus, a negative answer is // expected. -- cgit v1.2.3