summaryrefslogtreecommitdiff
path: root/test/buildtool/storage/local_ac.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/storage/local_ac.test.cpp')
-rw-r--r--test/buildtool/storage/local_ac.test.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/buildtool/storage/local_ac.test.cpp b/test/buildtool/storage/local_ac.test.cpp
index b3a4fcd1..c692a75c 100644
--- a/test/buildtool/storage/local_ac.test.cpp
+++ b/test/buildtool/storage/local_ac.test.cpp
@@ -18,7 +18,6 @@
#include "gsl/gsl"
#include "src/buildtool/common/artifact_digest.hpp"
#include "src/buildtool/common/bazel_types.hpp"
-#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_type.hpp"
#include "src/buildtool/storage/config.hpp"
@@ -38,7 +37,7 @@ TEST_CASE("LocalAC: Single action, single result", "[storage]") {
auto const& cas = storage.CAS();
auto action_id = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "action");
+ storage_config.Get().hash_function, "action");
CHECK(not ac.CachedResult(action_id));
CHECK(RunDummyExecution(&ac, &cas, action_id, "result"));
auto ac_result = ac.CachedResult(action_id);
@@ -53,9 +52,9 @@ TEST_CASE("LocalAC: Two different actions, two different results",
auto const& cas = storage.CAS();
auto action_id1 = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "action1");
+ storage_config.Get().hash_function, "action1");
auto action_id2 = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "action2");
+ storage_config.Get().hash_function, "action2");
CHECK(not ac.CachedResult(action_id1));
CHECK(not ac.CachedResult(action_id2));
@@ -84,9 +83,9 @@ TEST_CASE("LocalAC: Two different actions, same two results", "[storage]") {
auto const& cas = storage.CAS();
auto action_id1 = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "action1");
+ storage_config.Get().hash_function, "action1");
auto action_id2 = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "action2");
+ storage_config.Get().hash_function, "action2");
CHECK(not ac.CachedResult(action_id1));
CHECK(not ac.CachedResult(action_id2));
@@ -115,7 +114,7 @@ TEST_CASE("LocalAC: Same two actions, two different results", "[storage]") {
auto const& cas = storage.CAS();
auto action_id = ArtifactDigest::Create<ObjectType::File>(
- HashFunction::Instance(), "same action");
+ storage_config.Get().hash_function, "same action");
CHECK(not ac.CachedResult(action_id));
std::string result_content1{};