diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-10 18:51:20 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-13 14:41:00 +0200 |
commit | f60d39620b29aeaf1addeb244bdd6e15ddf4894c (patch) | |
tree | 2617d65884c975b3fc63dd48e58242ec36138246 /test/buildtool/storage | |
parent | ed8f24fb246142ffaa88707ae86b53c34df82986 (diff) | |
download | justbuild-f60d39620b29aeaf1addeb244bdd6e15ddf4894c.tar.gz |
Rename Compatibility class to ProtocolTraits
...and move it to the common stage.
Diffstat (limited to 'test/buildtool/storage')
-rw-r--r-- | test/buildtool/storage/TARGETS | 2 | ||||
-rw-r--r-- | test/buildtool/storage/large_object_cas.test.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/buildtool/storage/TARGETS b/test/buildtool/storage/TARGETS index 5eeafa9a..7b58b109 100644 --- a/test/buildtool/storage/TARGETS +++ b/test/buildtool/storage/TARGETS @@ -58,6 +58,7 @@ , ["@", "src", "src/buildtool/storage", "config"] , ["utils", "test_storage_config"] , ["@", "src", "src/buildtool/common", "bazel_types"] + , ["@", "src", "src/buildtool/common", "protocol_traits"] , ["utils", "large_object_utils"] , ["@", "src", "src/utils/cpp", "tmp_dir"] , [ "@" @@ -65,7 +66,6 @@ , "src/buildtool/execution_api/bazel_msg" , "bazel_msg_factory" ] - , ["@", "src", "src/buildtool/compatibility", "compatibility"] ] , "stage": ["test", "buildtool", "storage"] } diff --git a/test/buildtool/storage/large_object_cas.test.cpp b/test/buildtool/storage/large_object_cas.test.cpp index f0644694..cbc92038 100644 --- a/test/buildtool/storage/large_object_cas.test.cpp +++ b/test/buildtool/storage/large_object_cas.test.cpp @@ -28,7 +28,7 @@ #include "catch2/catch_test_macros.hpp" #include "src/buildtool/common/bazel_types.hpp" -#include "src/buildtool/compatibility/compatibility.hpp" +#include "src/buildtool/common/protocol_traits.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_msg_factory.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/object_type.hpp" @@ -405,7 +405,7 @@ static void TestExternal(StorageConfig const& storage_config, REQUIRE(FileSystemManager::IsFile(path)); } - if (kIsTree and not Compatibility::IsCompatible()) { + if (kIsTree and not ProtocolTraits::Instance().IsCompatible()) { // Tree invariants check is omitted in compatible mode. SECTION("Tree invariants check fails") { // Check splice fails due to the tree invariants check. @@ -606,7 +606,7 @@ TEST_CASE("LargeObjectCAS: uplink nested large objects", "[storage]") { // However, in native mode they might be reconstructed on request because // their entries are in the latest generation: - if (not Compatibility::IsCompatible()) { + if (not ProtocolTraits::Instance().IsCompatible()) { auto split_nested_tree_2 = latest.CAS().SplitTree(*nested_tree_digest); REQUIRE(split_nested_tree_2); @@ -720,7 +720,7 @@ auto Tree::StoreRaw(LocalCAS<kDefaultDoGlobalUplink> const& cas, return cas.StoreBlob(content); }; - return Compatibility::IsCompatible() + return ProtocolTraits::Instance().IsCompatible() ? BazelMsgFactory::CreateDirectoryDigestFromLocalTree( directory, store_blob, store_tree, store_symlink) : BazelMsgFactory::CreateGitTreeDigestFromLocalTree( |