summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/common/api_test.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 17:27:13 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-22 17:01:13 +0200
commitdd23c6e397584f4bf1cf84a73d9c382a8ff81de7 (patch)
tree0f0f600a4674a03da42c07f4ea016ff3c2dc578e /test/buildtool/execution_api/common/api_test.hpp
parentbeb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff)
downloadjustbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'test/buildtool/execution_api/common/api_test.hpp')
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index e2d8a17d..e00a3b32 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -21,6 +21,7 @@
#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
+#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/common/execution_action.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
#include "src/buildtool/execution_api/common/execution_response.hpp"
@@ -128,7 +129,8 @@ using ExecProps = std::map<std::string, std::string>;
ExecProps const& props,
bool is_hermetic = false) {
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"};
@@ -205,7 +207,8 @@ using ExecProps = std::map<std::string, std::string>;
ExecProps const& props,
bool is_hermetic = false) {
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);
auto input_artifact_opt =
ArtifactDescription::CreateKnown(test_digest, ObjectType::File)
@@ -289,7 +292,8 @@ using ExecProps = std::map<std::string, std::string>;
ApiFactory const& api_factory,
ExecProps const& props) {
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"};