diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 17:27:13 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:01:13 +0200 |
commit | dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 (patch) | |
tree | 0f0f600a4674a03da42c07f4ea016ff3c2dc578e /test/buildtool/execution_api/local/local_execution.test.cpp | |
parent | beb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff) | |
download | justbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz |
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'test/buildtool/execution_api/local/local_execution.test.cpp')
-rw-r--r-- | test/buildtool/execution_api/local/local_execution.test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp index 72db2800..cac83b2a 100644 --- a/test/buildtool/execution_api/local/local_execution.test.cpp +++ b/test/buildtool/execution_api/local/local_execution.test.cpp @@ -21,6 +21,7 @@ #include "catch2/catch_test_macros.hpp" #include "src/buildtool/common/artifact_description.hpp" #include "src/buildtool/common/repository_config.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/execution_api/local/local_api.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" @@ -172,7 +173,8 @@ TEST_CASE("LocalExecution: No input, create output", "[execution_api]") { &storage_config.Get(), &storage, &local_exec_config, &repo_config); std::string test_content("test"); - auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content); + auto test_digest = ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), test_content); std::string output_path{"output_file"}; std::vector<std::string> const cmdline = { @@ -231,7 +233,8 @@ TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") { &storage_config.Get(), &storage, &local_exec_config, &repo_config); std::string test_content("test"); - auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content); + auto test_digest = ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), test_content); REQUIRE(api.Upload(ArtifactBlobContainer{{ArtifactBlob{ test_digest, test_content, /*is_exec=*/false}}}, false)); |