From 31f907cb536eeea4c0546e4e99fe2f7bbe5817c8 Mon Sep 17 00:00:00 2001 From: jbajic Date: Wed, 30 Nov 2022 14:40:12 +0100 Subject: [PATCH] Remove keystore --- tests/unit/CMakeLists.txt | 3 -- tests/unit/storage_v3_key_store.cpp | 46 ----------------------------- 2 files changed, 49 deletions(-) delete mode 100644 tests/unit/storage_v3_key_store.cpp diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 188c6c1b0..5bfa26afd 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -328,9 +328,6 @@ target_link_libraries(${test_prefix}query_v2_dummy_test mg-query-v2) add_unit_test(storage_v3_property_store.cpp) target_link_libraries(${test_prefix}storage_v3_property_store mg-storage-v3 fmt) -add_unit_test(storage_v3_key_store.cpp) -target_link_libraries(${test_prefix}storage_v3_key_store mg-storage-v3 rapidcheck rapidcheck_gtest) - add_unit_test(storage_v3_indices.cpp) target_link_libraries(${test_prefix}storage_v3_indices mg-storage-v3) diff --git a/tests/unit/storage_v3_key_store.cpp b/tests/unit/storage_v3_key_store.cpp deleted file mode 100644 index 4e9ae4da1..000000000 --- a/tests/unit/storage_v3_key_store.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Memgraph Ltd. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source -// License, and you may not use this file except in compliance with the Business Source License. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -#include -#include -#include - -/** - * gtest/gtest.h must be included before rapidcheck/gtest.h! - */ -#include -#include -#include - -#include "storage/v3/id_types.hpp" -#include "storage/v3/key_store.hpp" -#include "storage/v3/property_value.hpp" - -namespace memgraph::storage::v3::test { - -RC_GTEST_PROP(KeyStore, KeyStore, (std::vector values)) { - RC_PRE(!values.empty()); - - std::vector property_values; - property_values.reserve(values.size()); - std::transform(values.begin(), values.end(), std::back_inserter(property_values), - [](std::string &value) { return PropertyValue{std::move(value)}; }); - - KeyStore key_store{property_values}; - - const auto keys = key_store.Keys(); - RC_ASSERT(keys.size() == property_values.size()); - for (int i = 0; i < keys.size(); ++i) { - RC_ASSERT(keys[i] == property_values[i]); - RC_ASSERT(key_store.GetKey(i) == property_values[i]); - } -} -} // namespace memgraph::storage::v3::test