summaryrefslogtreecommitdiff
path: root/test/buildtool/storage/local_cas.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/storage/local_cas.test.cpp')
-rw-r--r--test/buildtool/storage/local_cas.test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/buildtool/storage/local_cas.test.cpp b/test/buildtool/storage/local_cas.test.cpp
index c1d65b8e..b4ede8ca 100644
--- a/test/buildtool/storage/local_cas.test.cpp
+++ b/test/buildtool/storage/local_cas.test.cpp
@@ -17,7 +17,6 @@
#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"
@@ -34,7 +33,7 @@ TEST_CASE("LocalCAS: Add blob to storage from bytes", "[storage]") {
std::string test_bytes("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), test_bytes);
+ storage_config.Get().hash_function, test_bytes);
// check blob not in storage
CHECK(not cas.BlobPath(test_digest, true));
@@ -85,7 +84,7 @@ TEST_CASE("LocalCAS: Add blob to storage from non-executable file",
"test/buildtool/storage/data/non_executable_file"};
auto test_blob =
- CreateBlobFromPath(non_exec_file, HashFunction::Instance());
+ CreateBlobFromPath(non_exec_file, storage_config.Get().hash_function);
REQUIRE(test_blob);
// check blob not in storage
@@ -135,7 +134,8 @@ 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, HashFunction::Instance());
+ auto test_blob =
+ CreateBlobFromPath(exec_file, storage_config.Get().hash_function);
REQUIRE(test_blob);
// check blob not in storage