summaryrefslogtreecommitdiff
path: root/test/buildtool/storage/local_cas.test.cpp
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/storage/local_cas.test.cpp
parentbeb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff)
downloadjustbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'test/buildtool/storage/local_cas.test.cpp')
-rw-r--r--test/buildtool/storage/local_cas.test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/buildtool/storage/local_cas.test.cpp b/test/buildtool/storage/local_cas.test.cpp
index ef77a6a1..c1d65b8e 100644
--- a/test/buildtool/storage/local_cas.test.cpp
+++ b/test/buildtool/storage/local_cas.test.cpp
@@ -17,6 +17,7 @@
#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_digest.hpp"
+#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_type.hpp"
@@ -32,7 +33,8 @@ TEST_CASE("LocalCAS: Add blob to storage from bytes", "[storage]") {
std::string test_bytes("test");
- auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_bytes);
+ auto test_digest = ArtifactDigest::Create<ObjectType::File>(
+ HashFunction::Instance(), test_bytes);
// check blob not in storage
CHECK(not cas.BlobPath(test_digest, true));
@@ -82,7 +84,8 @@ TEST_CASE("LocalCAS: Add blob to storage from non-executable file",
std::filesystem::path non_exec_file{
"test/buildtool/storage/data/non_executable_file"};
- auto test_blob = CreateBlobFromPath(non_exec_file);
+ auto test_blob =
+ CreateBlobFromPath(non_exec_file, HashFunction::Instance());
REQUIRE(test_blob);
// check blob not in storage
@@ -132,7 +135,7 @@ TEST_CASE("LocalCAS: Add blob to storage from executable file", "[storage]") {
std::filesystem::path exec_file{
"test/buildtool/storage/data/executable_file"};
- auto test_blob = CreateBlobFromPath(exec_file);
+ auto test_blob = CreateBlobFromPath(exec_file, HashFunction::Instance());
REQUIRE(test_blob);
// check blob not in storage