summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/file_root.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-12 14:28:13 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-13 14:41:00 +0200
commit5fb67de531fead44123ff30ee5cf37340fc63a0b (patch)
tree0e1c7c8810e8ee311467e5e07ebb8ff2902adf28 /test/buildtool/file_system/file_root.test.cpp
parentdd15af0ba4b22348e38d535aadc9fa5e929f3824 (diff)
downloadjustbuild-5fb67de531fead44123ff30ee5cf37340fc63a0b.tar.gz
Use TestHashType in tests
...instead of calling ProtocolTraits::IsCompatible
Diffstat (limited to 'test/buildtool/file_system/file_root.test.cpp')
-rw-r--r--test/buildtool/file_system/file_root.test.cpp6
1 files changed, 2 insertions, 4 deletions
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);