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/graph_traverser/graph_traverser_remote.test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/buildtool/graph_traverser/graph_traverser_remote.test.cpp') diff --git a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp index bf3dfe02..a7888ac4 100644 --- a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp +++ b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp @@ -13,12 +13,12 @@ // limitations under the License. #include "catch2/catch_test_macros.hpp" -#include "src/buildtool/common/protocol_traits.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/storage.hpp" #include "test/buildtool/graph_traverser/graph_traverser.test.hpp" +#include "test/utils/hermeticity/test_hash_function_type.hpp" #include "test/utils/remote_execution/test_auth_config.hpp" #include "test/utils/remote_execution/test_remote_config.hpp" @@ -35,9 +35,7 @@ StorageConfig::Builder builder; auto config = builder.SetBuildRoot(cache_dir) - .SetHashType(ProtocolTraits::Instance().IsCompatible() - ? HashFunction::Type::PlainSHA256 - : HashFunction::Type::GitSHA1) + .SetHashType(TestHashType::ReadFromEnvironment()) .SetRemoteExecutionArgs(remote_config.remote_address, remote_config.platform_properties, remote_config.dispatch) -- cgit v1.2.3