summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/common/api_test.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-02 10:50:48 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-09 13:07:13 +0200
commit7eafe5779703275d455558120efc754c2dcc3c01 (patch)
treee31168069ef2460f187652157fe3c03be698d9a8 /test/buildtool/execution_api/common/api_test.hpp
parent50bcabb0717dae7c8411db59115c41b7cc636cb3 (diff)
downloadjustbuild-7eafe5779703275d455558120efc754c2dcc3c01.tar.gz
Replace ArtifactDigest::Create
...with ArtifactDigestFactory::HashDataAs
Diffstat (limited to 'test/buildtool/execution_api/common/api_test.hpp')
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index b93215a5..382760f6 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -24,6 +24,7 @@
#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
+#include "src/buildtool/common/artifact_digest_factory.hpp"
#include "src/buildtool/compatibility/compatibility.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/common/execution_action.hpp"
@@ -143,8 +144,8 @@ using ExecProps = std::map<std::string, std::string>;
? HashFunction::Type::PlainSHA256
: HashFunction::Type::GitSHA1};
- auto test_digest =
- ArtifactDigest::Create<ObjectType::File>(hash_function, test_content);
+ auto test_digest = ArtifactDigestFactory::HashDataAs<ObjectType::File>(
+ hash_function, test_content);
std::string output_path{"output_file"};
@@ -227,8 +228,8 @@ using ExecProps = std::map<std::string, std::string>;
? HashFunction::Type::PlainSHA256
: HashFunction::Type::GitSHA1};
- auto test_digest =
- ArtifactDigest::Create<ObjectType::File>(hash_function, test_content);
+ auto test_digest = ArtifactDigestFactory::HashDataAs<ObjectType::File>(
+ hash_function, test_content);
auto input_artifact_opt =
ArtifactDescription::CreateKnown(test_digest, ObjectType::File)
@@ -318,8 +319,8 @@ using ExecProps = std::map<std::string, std::string>;
? HashFunction::Type::PlainSHA256
: HashFunction::Type::GitSHA1};
- auto test_digest =
- ArtifactDigest::Create<ObjectType::File>(hash_function, test_content);
+ auto test_digest = ArtifactDigestFactory::HashDataAs<ObjectType::File>(
+ hash_function, test_content);
std::string output_path{"output_file"};