From 5fb67de531fead44123ff30ee5cf37340fc63a0b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 12 Sep 2024 14:28:13 +0200 Subject: Use TestHashType in tests ...instead of calling ProtocolTraits::IsCompatible --- test/buildtool/execution_engine/traverser/traverser.test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/buildtool/execution_engine/traverser/traverser.test.cpp') diff --git a/test/buildtool/execution_engine/traverser/traverser.test.cpp b/test/buildtool/execution_engine/traverser/traverser.test.cpp index 7b2e6293..cc5c22e9 100644 --- a/test/buildtool/execution_engine/traverser/traverser.test.cpp +++ b/test/buildtool/execution_engine/traverser/traverser.test.cpp @@ -24,10 +24,10 @@ #include "catch2/catch_test_macros.hpp" #include "src/buildtool/common/artifact_description.hpp" -#include "src/buildtool/common/protocol_traits.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_engine/dag/dag.hpp" #include "test/utils/container_matchers.hpp" +#include "test/utils/hermeticity/test_hash_function_type.hpp" namespace { @@ -184,9 +184,7 @@ class TestProject { auto inputs_desc = ActionDescription::inputs_t{}; if (not inputs.empty()) { command.emplace_back("FROM"); - auto const hash_type = ProtocolTraits::Instance().IsCompatible() - ? HashFunction::Type::PlainSHA256 - : HashFunction::Type::GitSHA1; + auto const hash_type = TestHashType::ReadFromEnvironment(); for (auto const& input_desc : inputs) { auto artifact = ArtifactDescription::FromJson(hash_type, input_desc); -- cgit v1.2.3