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/file_system/file_root.test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/buildtool/file_system/file_root.test.cpp') diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp index 1a27dd1b..94a2a552 100644 --- a/test/buildtool/file_system/file_root.test.cpp +++ b/test/buildtool/file_system/file_root.test.cpp @@ -25,10 +25,10 @@ #include "src/buildtool/common/artifact_description.hpp" #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/artifact_digest_factory.hpp" -#include "src/buildtool/common/protocol_traits.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "test/utils/container_matchers.hpp" +#include "test/utils/hermeticity/test_hash_function_type.hpp" #include "test/utils/shell_quoting.hpp" namespace { @@ -380,9 +380,7 @@ static void CheckGitRoot(HashFunction::Type hash_type, bool ignore_special) noexcept; TEST_CASE("Creating artifact descriptions", "[file_root]") { - auto const hash_type = ProtocolTraits::Instance().IsCompatible() - ? HashFunction::Type::PlainSHA256 - : HashFunction::Type::GitSHA1; + auto const hash_type = TestHashType::ReadFromEnvironment(); SECTION("local root") { CheckLocalRoot(hash_type, /*ignore_special=*/false); -- cgit v1.2.3