diff --git a/include/linkahead/authentication.h b/include/linkahead/authentication.h index 1f2ffa8623a4c201eba5289c76fbd4bfbd1cc716..c09fe4261096e1850383b59dcfd2b4797b120961 100644 --- a/include/linkahead/authentication.h +++ b/include/linkahead/authentication.h @@ -27,15 +27,15 @@ * @date 2021-06-28 * @brief Configuration and setup of the client authentication. */ -#include "linkahead/utility.h" // for base64_encode #include <grpcpp/security/auth_context.h> // for AuthContext -#include <grpcpp/security/credentials.h> // for CallCredentials +#include <grpcpp/security/credentials.h> // for CallCredentials, MetadataC... +#include <grpcpp/support/config.h> // for string #include <grpcpp/support/interceptor.h> // for Status -#include <grpcpp/support/status.h> // for Status #include <grpcpp/support/string_ref.h> // for string_ref #include <map> // for multimap #include <memory> // for shared_ptr -#include <string> // for string +#include <string> // for string, basic_string +#include "linkahead/utility.h" // for base64_encode namespace linkahead { namespace authentication { diff --git a/include/linkahead/configuration.h b/include/linkahead/configuration.h index 90378d11af5af365138fda2b84257d1554315e09..d86658a57bfa16491f5a19096cb1ab098b4d966e 100644 --- a/include/linkahead/configuration.h +++ b/include/linkahead/configuration.h @@ -155,7 +155,7 @@ private: JsonValue json_configuration; static ConfigurationManager mInstance; - inline ConfigurationManager() + inline ConfigurationManager() noexcept : json_configuration(nullptr) { // InitializeDefaults(); }; diff --git a/include/linkahead/entity.h b/include/linkahead/entity.h index 2f19bcf53713c53816f90c7d28c7421e6dc27067..e4dae827af903cd17d2cc8bf6373ce7218c0cffc 100644 --- a/include/linkahead/entity.h +++ b/include/linkahead/entity.h @@ -29,24 +29,24 @@ #ifndef LINKAHEAD_ENTITY_H #define LINKAHEAD_ENTITY_H -#include "linkahead/data_type.h" // for DataType -#include "caosdb/entity/v1/main.pb.h" // for RepeatedPtrField -#include "linkahead/file_descriptor.h" // for FileDescriptor -#include "linkahead/logging.h" // for LINKAHEAD_LOG_WARN -#include "linkahead/message_code.h" // for get_message_code -#include "linkahead/protobuf_helper.h" // for get_arena -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead/value.h" // for Value -#include <cstdint> // for int64_t -#include <filesystem> // for path -#include <google/protobuf/arena.h> // for Arena #include <google/protobuf/message.h> // for RepeatedPtrField -#include <iterator> // for iterator, output_iterato... +#include <cstdint> // for int64_t +#include <filesystem> // for path, exists, is_directory +#include <iosfwd> // for ptrdiff_t +#include <iterator> // for output_iterator_tag #include <map> // for map #include <stdexcept> // for out_of_range -#include <string> // for string, basic... -#include <utility> // for move +#include <string> // for string, basic_string, operator== +#include <utility> // for move, pair #include <vector> // for vector +#include "caosdb/entity/v1/main.pb.h" // for Entity, EntityRole, Property +#include "linkahead/data_type.h" // for DataType, AtomicDataType +#include "linkahead/file_descriptor.h" // for FileDescriptor +#include "linkahead/logging.h" // for LoggerOutputStream, LINKAHEAD... +#include "linkahead/message_code.h" // for get_message_code, MessageCode +#include "linkahead/protobuf_helper.h" // for ScalarProtoMessageWrapper +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead/value.h" // for Value, AbstractValue, Arena // IWYU pragma: no_include "net/proto2/public/repeated_field.h" namespace linkahead::entity { diff --git a/include/linkahead/file_transmission/download_request_handler.h b/include/linkahead/file_transmission/download_request_handler.h index deec6c23eefe8b2b29dd689eb91c805dd3d9b593..8419a0e3ab110a8fd0da272d3dbda16dc58cb52b 100644 --- a/include/linkahead/file_transmission/download_request_handler.h +++ b/include/linkahead/file_transmission/download_request_handler.h @@ -49,17 +49,18 @@ #ifndef LINKAHEAD_FILE_TRANSMISSION_DOWNLOAD_REQUEST_HANDLER_H #define LINKAHEAD_FILE_TRANSMISSION_DOWNLOAD_REQUEST_HANDLER_H -#include "linkahead/file_descriptor.h" // for FileDescriptor -#include "caosdb/entity/v1/main.pb.h" // for FileTransmissionS... -#include "caosdb/entity/v1/main.grpc.pb.h" // for FileDownloadResponse -#include "linkahead/file_transmission/file_writer.h" // for FileWriter -#include "linkahead/handler_interface.h" // for HandlerTag, Handl... -#include <cstdint> // for uint64_t #include <grpcpp/client_context.h> // for ClientContext #include <grpcpp/completion_queue.h> // for CompletionQueue #include <grpcpp/support/async_stream.h> // for ClientAsyncReader +#include <grpcpp/support/interceptor.h> // for InterceptionHoo... #include <grpcpp/support/status.h> // for Status +#include <cstdint> // for uint64_t #include <memory> // for unique_ptr +#include "caosdb/entity/v1/main.grpc.pb.h" // for FileTransmissio... +#include "caosdb/entity/v1/main.pb.h" // for FileDownloadRes... +#include "linkahead/file_descriptor.h" // for FileDescriptor +#include "linkahead/file_transmission/file_writer.h" // for FileWriter +#include "linkahead/handler_interface.h" // for HandlerTag, Han... namespace linkahead::transaction { using caosdb::entity::v1::FileDownloadRequest; diff --git a/include/linkahead/result_set.h b/include/linkahead/result_set.h index 78155f5e01b41ebbeb82ce17b54d3a22806f2f99..0ada000f0faaec395ace73f725d504f44a473dc4 100644 --- a/include/linkahead/result_set.h +++ b/include/linkahead/result_set.h @@ -21,12 +21,12 @@ #ifndef LINKAHEAD_RESULT_SET_H #define LINKAHEAD_RESULT_SET_H -#include "linkahead/entity.h" // for Entity, FileDe... -#include <algorithm> // for max -#include <iterator> // for iterator, next -#include <memory> // for unique_ptr +#include <iosfwd> // for ptrdiff_t +#include <iterator> // for output_iterator_tag +#include <memory> // for unique_ptr, make_unique #include <utility> // for move #include <vector> // for vector +#include "linkahead/entity.h" // for Entity // IWYU pragma: no_include <ext/alloc_traits.h> namespace linkahead::transaction { @@ -58,7 +58,6 @@ public: private: class iterator { public: - using iterator_category = std::output_iterator_tag; using value_type = Entity; using difference_type = std::ptrdiff_t; diff --git a/include/linkahead/result_table.h b/include/linkahead/result_table.h index b20457f778444094d311115bf607c2378f055df6..c6a122973391f491b121bf75bb179c63d955407c 100644 --- a/include/linkahead/result_table.h +++ b/include/linkahead/result_table.h @@ -21,10 +21,11 @@ #ifndef LINKAHEAD_RESULT_TABLE_H #define LINKAHEAD_RESULT_TABLE_H -#include "linkahead/value.h" // for Value -#include <iterator> // for iterator, next +#include <iosfwd> // for ptrdiff_t +#include <iterator> // for output_iterator_tag #include <memory> // for unique_ptr #include <string> // for string +#include "linkahead/value.h" // for Value namespace linkahead::transaction { using linkahead::entity::Value; diff --git a/include/linkahead/transaction.h b/include/linkahead/transaction.h index 442d5366975b7798178210d78a518ac250f14232..19becfc0a6770e4bad0bf265737e910a842c2454 100644 --- a/include/linkahead/transaction.h +++ b/include/linkahead/transaction.h @@ -21,29 +21,27 @@ #ifndef LINKAHEAD_TRANSACTION_H #define LINKAHEAD_TRANSACTION_H -#include "linkahead/entity.h" // for Entity, FileDe... -#include "caosdb/entity/v1/main.pb.h" // for EntityTransact... -#include "caosdb/entity/v1/main.grpc.pb.h" // for MultiTransacti... -#include "linkahead/file_descriptor.h" // for FileDescriptor -#include "linkahead/handler_interface.h" // for HandlerInterface -#include "linkahead/transaction_handler.h" // for EntityTransactionHandler -#include "linkahead/logging.h" // for LINKAHEAD_LOG_ERR... -#include "linkahead/protobuf_helper.h" // for get_arena -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead/result_set.h" // for ResultSet -#include "linkahead/result_table.h" // for ResultTable -#include "linkahead/transaction_status.h" // for StatusCode -#include "linkahead/value.h" // for Value -#include <future> // for async, future -#include <google/protobuf/arena.h> // for Arena -#include <google/protobuf/util/json_util.h> // for MessageToJsonS... +#include <google/protobuf/util/json_util.h> // for JsonPrintOptions, Messag... #include <grpcpp/completion_queue.h> // for CompletionQueue -#include <iterator> // for iterator, next +#include <future> // for future +#include <iterator> // for next #include <map> // for map -#include <memory> // for unique_ptr +#include <memory> // for unique_ptr, shared_ptr #include <mutex> // for mutex -#include <string> // for string +#include <string> // for string, basic_string #include <vector> // for vector +#include "caosdb/entity/v1/main.grpc.pb.h" // for EntityTransactionService +#include "caosdb/entity/v1/main.pb.h" // for MultiTransactionRequest +#include "linkahead/entity.h" // for Entity +#include "linkahead/file_descriptor.h" // for FileDescriptor +#include "linkahead/handler_interface.h" // for logger_name, HandlerInte... +#include "linkahead/logging.h" // for LINKAHEAD_LOG_ERROR_AND_... +#include "linkahead/protobuf_helper.h" // for get_arena +#include "linkahead/result_set.h" // for MultiResultSet, ResultSet +#include "linkahead/result_table.h" // for ResultTable +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead/transaction_status.h" // for StatusCode, TransactionS... +#include "linkahead/value.h" // for Value /** * Do all necessary checks and assure that another retrieval (by id or by diff --git a/src/linkahead/authentication.cpp b/src/linkahead/authentication.cpp index ec67c5efa5acc574bf52b6da1dfc9173096cbfd2..feafae4057d1c4a52bc160b35fe45ef0e519a3e4 100644 --- a/src/linkahead/authentication.cpp +++ b/src/linkahead/authentication.cpp @@ -19,13 +19,14 @@ * */ #include "linkahead/authentication.h" -#include "linkahead/utility.h" // for base64_encode -#include <grpcpp/security/credentials.h> // for MetadataCredentialsPlugin #include <grpcpp/security/auth_context.h> // for AuthContext +#include <grpcpp/security/credentials.h> // for MetadataCredentialsPlugin +#include <grpcpp/support/status.h> // for Status #include <map> // for multimap -#include <memory> // for allocator, shared_ptr +#include <memory> // for allocator, shared_ptr, uni... #include <string> // for basic_string, operator+ #include <utility> // for pair, move, make_pair +#include "linkahead/utility.h" // for base64_encode namespace linkahead::authentication { using grpc::AuthContext; diff --git a/src/linkahead/configuration.cpp b/src/linkahead/configuration.cpp index d992006edb370fbdeaf8ff886a9a168e16706f0a..377c8241e7b72619e3898994dabdb013dc47fca0 100644 --- a/src/linkahead/configuration.cpp +++ b/src/linkahead/configuration.cpp @@ -19,31 +19,30 @@ * */ #include "linkahead/configuration.h" -#include "linkahead/authentication.h" // for Authenticator -#include "linkahead/connection.h" // for ConnectionManager -#include "linkahead/constants.h" // for LIBLINKAHEAD_CONF... -#include "linkahead/exceptions.h" // for ConfigurationE... -#include "linkahead/log_level.h" // for LINKAHEAD_DEFAULT... -#include "linkahead/logging.h" // for SinkConfiguration, Loggin... -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead/utility.h" // for get_home_direc... -#include <boost/json/impl/object.hpp> // for object::at -#include <boost/json/object.hpp> // for object, objec... -#include <boost/json/string.hpp> // for string -#include <boost/json/string_view.hpp> // for string_view -#include <boost/json/value.hpp> // for value, key_va... -#include <boost/json/value_ref.hpp> // for object -#include <cassert> // for assert -#include <cstdlib> // for getenv -#include <cstring> // for strcmp -#include <exception> // IWYU pragma: keep -// IWYU pragma: no_include <bits/exception.h> -#include <grpcpp/security/credentials.h> // for SslCredentials +#include <grpcpp/security/credentials.h> // for SslCredentialsOptions, SslC... +#include <boost/json/impl/object.hpp> // for object::at, object::empty +#include <boost/json/object.hpp> // for object +#include <boost/json/string.hpp> // for string +#include <boost/json/value.hpp> // for value +#include <boost/json/value_ref.hpp> // for object +#include <cassert> // for assert +#include <cstdlib> // for getenv +#include <cstring> // for strcmp +#include <exception> // for exception #include <iterator> // for next #include <map> // for map +#include <ostream> // for basic_ios, basic_ostream #include <stdexcept> // for out_of_range -#include <string> // for string, operator+ -#include <utility> // for move +#include <string> // for basic_string, operator+ +#include <utility> // for pair, move +#include "linkahead/authentication.h" // for Authenticator, PlainPasswor... +#include "linkahead/connection.h" // for ConnectionManager +#include "linkahead/constants.h" // for LIBLINKAHEAD_CONFIGURATION_... +#include "linkahead/exceptions.h" // for ConfigurationError, Exception +#include "linkahead/log_level.h" // for LINKAHEAD_LOG_LEVEL_OFF +#include "linkahead/logging.h" // for FileSinkConfiguration, Cons... +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead/utility.h" // for JsonValue, get_home_directory // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define WRAPPED_JSON_CONFIGURATION(obj) \ diff --git a/src/linkahead/file_transmission/download_request_handler.cpp b/src/linkahead/file_transmission/download_request_handler.cpp index 1d8d03b56cec5abeb2fbe40e38cc9d6c8f817102..ae1e9cb88199ccdf366c28b69622865e8b640c46 100644 --- a/src/linkahead/file_transmission/download_request_handler.cpp +++ b/src/linkahead/file_transmission/download_request_handler.cpp @@ -47,20 +47,19 @@ * > DEALINGS IN THE SOFTWARE. */ #include "linkahead/file_transmission/download_request_handler.h" -#include "linkahead/logging.h" // for LINKAHEAD_LOG_TRACE -#include "linkahead/protobuf_helper.h" // for get_arena -#include "linkahead/status_code.h" // for GENERIC_RPC_E... -#include "linkahead/transaction_status.h" // for TransactionStatus -#include <exception> // IWYU pragma: keep -#include <filesystem> // for operator<<, path #include <google/protobuf/arena.h> // for Arena #include <grpcpp/client_context.h> // for ClientContext #include <grpcpp/completion_queue.h> // for CompletionQueue #include <grpcpp/support/async_stream.h> // for ClientAsyncReader -#include <grpcpp/support/status.h> // for Status +#include <grpcpp/support/status.h> // for Status, StatusCode +#include <exception> // for exception #include <stdexcept> // for runtime_error -#include <string> // for string, opera... +#include <string> // for basic_string, operator+ #include <utility> // for move +#include "linkahead/logging.h" // for LoggerOutputStream, LINKAH... +#include "linkahead/protobuf_helper.h" // for get_arena +#include "linkahead/status_code.h" // for get_status_description +#include "linkahead/transaction_status.h" // for TransactionStatus // IWYU pragma: no_include <bits/exception.h> // namespace linkahead::transaction { diff --git a/src/linkahead/logging.cpp b/src/linkahead/logging.cpp index 642f2ae75c26c901704818ac633e419817c58cc7..a3060697b521fc35169a8b8ec19acbb08f249540 100644 --- a/src/linkahead/logging.cpp +++ b/src/linkahead/logging.cpp @@ -19,7 +19,8 @@ * */ #include "linkahead/logging.h" -#include "linkahead/log_level.h" +#include <boost/core/swap.hpp> // for swap +#include <boost/iterator/iterator_facade.hpp> #include <boost/log/attributes/clock.hpp> #include <boost/log/core/core.hpp> // for core #include <boost/log/core/record.hpp> @@ -27,13 +28,21 @@ #include <boost/log/sources/severity_channel_logger.hpp> #include <boost/log/utility/setup/from_settings.hpp> #include <boost/log/utility/setup/settings.hpp> +#include <boost/multi_index/detail/bidir_node_iterator.hpp> +#include <boost/operators.hpp> +#include <boost/preprocessor/seq/limits/enum_256.hpp> +#include <boost/preprocessor/seq/limits/size_256.hpp> +#include <boost/property_tree/detail/exception_implementation.hpp> +#include <boost/property_tree/detail/ptree_implementation.hpp> +#include <boost/smart_ptr/intrusive_ref_counter.hpp> #include <boost/smart_ptr/shared_ptr.hpp> -#include <cstdint> // for uint64_t -#include <filesystem> +#include <cstdint> +#include <filesystem> // for path #include <memory> #include <string> #include <utility> // for move #include <vector> +#include "linkahead/log_level.h" namespace linkahead::logging { using boost_logger_class = boost::log::sources::severity_channel_logger_mt<int, std::string>; diff --git a/src/linkahead/result_table.cpp b/src/linkahead/result_table.cpp index c08cc4db516f9b4c238cc3c5a7f18a90ea557cde..0653f03fcfb2ece3fb68c1e3d27f9fd5f5915824 100644 --- a/src/linkahead/result_table.cpp +++ b/src/linkahead/result_table.cpp @@ -18,17 +18,15 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ -#include "linkahead/result_table.h" // for ResultTable, ResultTab... -#include "caosdb/entity/v1/main.pb.h" // for SelectQueryResult, Sel... -#include "linkahead/protobuf_helper.h" // for ScalarProtoMessageWrapper -#include "linkahead/result_table_impl.h" // for ResultTableImpl, Resul... -#include "linkahead/value.h" // for Value -#include <algorithm> // for max -#include <google/protobuf/repeated_field.h> // IWYU pragma: keep for RepeatedPtrField -#include <memory> // for unique_ptr -#include <string> // for string, operator== -#include <utility> // for move -#include <vector> // for vector +#include "linkahead/result_table.h" +#include <memory> // for unique_ptr +#include <string> // for string, operator==, basic_s... +#include <utility> // for move +#include <vector> // for vector +#include "caosdb/entity/v1/main.pb.h" // for SelectQueryResult, SelectQu... +#include "linkahead/protobuf_helper.h" // for ScalarProtoMessageWrapper +#include "linkahead/result_table_impl.h" // for ResultTableImpl, ResultTabl... +#include "linkahead/value.h" // for Value // IWYU pragma: no_include "net/proto2/public/repeated_field.h" namespace linkahead::transaction { diff --git a/src/linkahead/status_code_description.cpp b/src/linkahead/status_code_description.cpp index 59517c4763a2450d5c01675b54fe23a4a8b6955d..7183c38a362566347e52361a909825696fcbd1ea 100644 --- a/src/linkahead/status_code_description.cpp +++ b/src/linkahead/status_code_description.cpp @@ -18,10 +18,11 @@ * */ -#include "linkahead/status_code.h" // for StatusCode, ABORTED, ALREADY_EXISTS -#include <map> // for allocator, map +#include <map> // for map #include <stdexcept> // for out_of_range -#include <string> // for string, basic_string +#include <string> // for basic_string, string +#include <utility> // for pair +#include "linkahead/status_code.h" // for StatusCode, get_status_description namespace linkahead { diff --git a/src/linkahead/transaction.cpp b/src/linkahead/transaction.cpp index bf810084fe366a1de4ef3ff88c6bdbf024292577..7abd06e566bf97bc7793bb97a0c27cc273befdaa 100644 --- a/src/linkahead/transaction.cpp +++ b/src/linkahead/transaction.cpp @@ -18,31 +18,27 @@ * */ #include "linkahead/transaction.h" -#include "caosdb/entity/v1/main.pb.h" // for EntityTransac... -#include "caosdb/entity/v1/main.grpc.pb.h" // for TransactionRe... -#include "linkahead/file_transmission/download_request_handler.h" // Download... -#include "linkahead/file_transmission/file_reader.h" // for path -#include "linkahead/file_transmission/register_file_upload_handler.h" // for RegisterFileUploadHandler -#include "linkahead/file_transmission/upload_request_handler.h" // Upload... -#include "linkahead/logging.h" // for LINKAHEAD_LOG_FATAL -#include "linkahead/protobuf_helper.h" // for ProtoMessageWrapper -#include "linkahead/result_set.h" // for ResultSet -#include "linkahead/result_table.h" // for ResultTable -#include "linkahead/result_table_impl.h" // for ResultTableImpl -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead/transaction_handler.h" // for EntityTransactionHandler -#include <algorithm> // for max -#include <exception> // IWYU pragma: keep -#include <filesystem> // for operator<<, path -#include <future> // for async, future -#include <google/protobuf/arena.h> // for Arena -#include <grpc/grpc.h> // for gpr_timespec -#include <map> // for map, operator!= -#include <memory> // for unique_ptr -#include <random> // for mt19937, rand... -#include <string> // for string -#include <system_error> // for std::system_error -#include <utility> // for move, pair +#include <google/protobuf/arena.h> +#include <grpc/grpc.h> +#include <filesystem> +#include <future> +#include <map> +#include <memory> +#include <random> +#include <string> +#include <utility> +#include "caosdb/entity/v1/main.grpc.pb.h" +#include "caosdb/entity/v1/main.pb.h" +#include "linkahead/file_transmission/download_request_handler.h" +#include "linkahead/file_transmission/register_file_upload_handler.h" +#include "linkahead/file_transmission/upload_request_handler.h" +#include "linkahead/logging.h" +#include "linkahead/protobuf_helper.h" +#include "linkahead/result_set.h" +#include "linkahead/result_table.h" +#include "linkahead/result_table_impl.h" +#include "linkahead/status_code.h" +#include "linkahead/transaction_handler.h" // IWYU pragma: no_include <cxxabi.h> // IWYU pragma: no_include "net/proto2/public/repeated_field.h" diff --git a/src/linkahead/transaction_handler.cpp b/src/linkahead/transaction_handler.cpp index a1214a70321952d18bc52547dacbd5c3189dcc48..57bebd963ba114df1376931739cfcfe3be149041 100644 --- a/src/linkahead/transaction_handler.cpp +++ b/src/linkahead/transaction_handler.cpp @@ -1,6 +1,6 @@ #include "linkahead/transaction_handler.h" -#include "linkahead/logging.h" // for LINKAHEAD_LOG_TRACE -#include <exception> // IWYU pragma: keep +#include <string> // for basic_string +#include "linkahead/logging.h" // for LINKAHEAD_LOG_TRACE_ENTER_AND_LEAVE // IWYU pragma: no_include <bits/exception.h> namespace linkahead::transaction { diff --git a/test/test_clinkahead.cpp b/test/test_clinkahead.cpp index 25e83fe9da32a440ea2c675ee6b5c9bd08e9894a..0cd8afb95c9aee1e51c069b0408b426eb9893522 100644 --- a/test/test_clinkahead.cpp +++ b/test/test_clinkahead.cpp @@ -20,17 +20,17 @@ * */ -#include "linkahead/configuration.h" -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE, TEST_DATA_DIR -#include "clinkahead.h" // for linkahead_utility_get_env_fallback -#include <cstdint> // for int64_t -#include <cstring> // for strcmp -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, EXPECT_EQ, TEST -#include <string> // for allocator, operator+, string,... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult, EXPECT_EQ, EXP... +#include <cstdint> // for int64_t +#include <cstring> // for strcmp +#include <filesystem> // for path +#include <string> // for allocator, basic_string, operator+ +#include "clinkahead.h" // for linkahead_entity_delete_value +#include "linkahead/configuration.h" // for ConfigurationManager +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead_test_utility.h" // for TEST_DATA_DIR class test_clinkahead : public ::testing::Test { protected: diff --git a/test/test_configuration.cpp b/test/test_configuration.cpp index 2d95bd3a9d5eceed102de593a77b56f387bacc27..18c102806b51f34a264adb976efb460b487a1a66 100644 --- a/test/test_configuration.cpp +++ b/test/test_configuration.cpp @@ -19,17 +19,17 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ -#include "linkahead/configuration.h" // for ConfigurationError, Configuration... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for TestInfo, TEST_F, Test +#include <filesystem> // for path +#include <memory> // for make_shared, shared_ptr +#include <string> // for basic_string, operator+ +#include "linkahead/configuration.h" // for ConfigurationError, Configurati... #include "linkahead/exceptions.h" // for ConfigurationError -#include "linkahead/log_level.h" // for LINKAHEAD_DEFAULT_LOG_LEVEL, LINKAHEAD_... -#include "linkahead/logging.h" // for ConsoleSinkConfiguration, Logging... -#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE, TEST_DATA_DIR -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver -#include <gtest/gtest_pred_impl.h> // for TestInfo, TEST_F, Test -#include <memory> // for make_shared -#include <string> // for operator+, allocator, string +#include "linkahead/log_level.h" // for LINKAHEAD_DEFAULT_LOG_LEVEL +#include "linkahead/logging.h" // for ConsoleSinkConfiguration, Loggi... +#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE, TEST_DATA... namespace linkahead::configuration { diff --git a/test/test_connection.cpp b/test/test_connection.cpp index aa805ad09d202f19d59828f3712255c52008fbb4..07db64a5884c8777c88fd879a026bfd2fbf9aebc 100644 --- a/test/test_connection.cpp +++ b/test/test_connection.cpp @@ -22,17 +22,17 @@ #ifdef BUILD_ACM #include "linkahead/acm/user.h" // for User #endif +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult, TestInfo +#include <filesystem> // for path +#include <memory> // for operator!=, shared_ptr +#include <string> // for basic_string, operator+ #include "linkahead/certificate_provider.h" // for PemCertificateProvider -#include "linkahead/configuration.h" // for InsecureConnectionConfigura... +#include "linkahead/configuration.h" // for InsecureConnectionConfig... #include "linkahead/connection.h" // for ConnectionManager -#include "linkahead/exceptions.h" // for ConnectionConfigurationError -#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE, TEST_... -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartR... -#include <gtest/gtest_pred_impl.h> // for AssertionResult, TestInfo -#include <memory> // for allocator, operator!=, shar... -#include <string> // for operator+, string +#include "linkahead/exceptions.h" // for ConnectionConfigurationE... +#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE namespace linkahead::connection { #ifdef BUILD_ACM diff --git a/test/test_data_type.cpp b/test/test_data_type.cpp index aa90cb32e9eb03f6be6e4d22ebf337ab3270432d..08799d48e8e1db07ef66c158a92e5ca8e4735245 100644 --- a/test/test_data_type.cpp +++ b/test/test_data_type.cpp @@ -20,18 +20,17 @@ * */ -#include "linkahead/data_type.h" // for DataType, AtomicDataType -#include "linkahead/entity.h" // for Entity -#include "caosdb/entity/v1/main.pb.h" // for DataType, Ato... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test, EXPECT_EQ +#include <map> // for _Rb_tree_const_iterator, map +#include <string> // for allocator, basic_string, char... +#include <utility> // for pair, move +#include "caosdb/entity/v1/main.pb.h" // for AtomicDataType, DataType, Entity +#include "linkahead/data_type.h" // for DataType, ListDataType, Refer... +#include "linkahead/entity.h" // for Entity, Role #include "linkahead/logging.h" // for LINKAHEAD_LOG_DEBUG -#include "linkahead/protobuf_helper.h" // for LINKAHEAD_DEBUG_... -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... -#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <map> // for map, operator!= -#include <string> // for allocator -#include <utility> // for pair +#include "linkahead/protobuf_helper.h" // for reset_arena, LINKAHEAD_DEBUG_... namespace linkahead::entity { using ProtoEntity = caosdb::entity::v1::Entity; diff --git a/test/test_entity.cpp b/test/test_entity.cpp index 61e53c13ec41b9f0fda2ea14ea931bc7c053eaf4..b521bd8cac676bd79bc51a8a6d9d3b54959fc272 100644 --- a/test/test_entity.cpp +++ b/test/test_entity.cpp @@ -20,26 +20,26 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ -#include "linkahead/data_type.h" // for DataType, AtomicDat... -#include "linkahead/entity.h" // for Entity, Property -#include "caosdb/entity/v1/main.pb.h" // for EntityTransactionSe... -#include "caosdb/entity/v1/main.grpc.pb.h" // for IdResponse, Message -#include "linkahead/message_code.h" // for MessageCode, ENTITY... +#include <google/protobuf/arena.h> // for Arena +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, Assertio... +#include <filesystem> // for path +#include <iostream> // for basic_ostream, operator<< +#include <memory> // for shared_ptr +#include <stdexcept> // for out_of_range +#include <string> // for basic_string, operator+ +#include <utility> // for move +#include "caosdb/entity/v1/main.grpc.pb.h" // for EntityTransactionService +#include "caosdb/entity/v1/main.pb.h" // for EntityResponse, Entity +#include "linkahead/data_type.h" // for AtomicDataType, DataType +#include "linkahead/entity.h" // for Entity, Property, Parent +#include "linkahead/message_code.h" // for MessageCode #include "linkahead/protobuf_helper.h" // for get_arena -#include "linkahead/status_code.h" // for StatusCode, FILE_DO... -#include "linkahead/transaction.h" // for Transaction -#include "linkahead/value.h" // for Value +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead/transaction.h" // for Transaction, EntityTransa... +#include "linkahead/value.h" // for Value, Arena #include "linkahead_test_utility.h" // for TEST_DATA_DIR -#include <google/protobuf/arena.h> // for Arena -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, Sui... -#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ -#include <iostream> // for operator<<, basic_o... -#include <memory> // for allocator, shared_ptr -#include <stdexcept> // for out_of_range -#include <string> // for operator+, to_string -#include <utility> // for move // IWYU pragma: no_include "net/proto2/public/repeated_field.h" namespace linkahead::entity { diff --git a/test/test_file_transmission.cpp b/test/test_file_transmission.cpp index 27cac5615525c23ee9cf8bc112489157ce8e9c59..ce5173538b540e045c9dc96994d9435d2484ceb0 100644 --- a/test/test_file_transmission.cpp +++ b/test/test_file_transmission.cpp @@ -17,16 +17,13 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "linkahead/file_transmission/file_writer.h" -#include "linkahead/file_transmission/file_reader.h" -#include <chrono> // for filesystem -#include <filesystem> // for path -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver -#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, AssertionResult -#include <string> // for string - +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult +#include <filesystem> // for path, exists +#include <string> // for basic_string +#include "linkahead/file_transmission/file_reader.h" // for FileReader +#include "linkahead/file_transmission/file_writer.h" // for FileWriter namespace fs = std::filesystem; namespace linkahead::transaction { diff --git a/test/test_info.cpp b/test/test_info.cpp index 20be8fb5ff43d7b5481ab4e01d95728ed80ab606..2e77754b3b29551b145e659ae4a728fb6867dd36 100644 --- a/test/test_info.cpp +++ b/test/test_info.cpp @@ -20,13 +20,11 @@ * */ -#include "linkahead/info.h" // for VersionInfo +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult #include "caosdb/info/v1/main.pb.h" // for VersionInfo -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiRe... -#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST -#include <memory> // for allocator +#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TestInfo, TEST +#include "linkahead/info.h" // for VersionInfo namespace linkahead::info { using ProtoVersionInfo = caosdb::info::v1::VersionInfo; diff --git a/test/test_issues.cpp b/test/test_issues.cpp index 41a004689a33b338dd50468cd94f5be6e6178f98..594eded6ff78d70508d0254a9d87aa8256e0894a 100644 --- a/test/test_issues.cpp +++ b/test/test_issues.cpp @@ -17,17 +17,17 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "linkahead/configuration.h" // for InsecureConnectionConfig... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TestInfo +#include <memory> // for unique_ptr +#include <string> // for basic_string +#include "linkahead/configuration.h" // for InsecureConnectionConfigur... #include "linkahead/connection.h" // for Connection #include "linkahead/result_set.h" // for ResultSet -#include "linkahead/status_code.h" // for StatusCode, EXECUTING +#include "linkahead/status_code.h" // for StatusCode #include "linkahead/transaction.h" // for Transaction #include "linkahead/transaction_status.h" // for StatusCode -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa... -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST -#include <memory> // for allocator, unique_ptr namespace linkahead::transaction { using linkahead::configuration::InsecureConnectionConfiguration; diff --git a/test/test_list_properties.cpp b/test/test_list_properties.cpp index 63d4aa65d3d4296484248133bd6a1ff5357153ca..ec9c8f23c9f1fa3723b068bb0e15cf65bbb35095 100644 --- a/test/test_list_properties.cpp +++ b/test/test_list_properties.cpp @@ -20,18 +20,16 @@ * */ -#include "linkahead/data_type.h" // for DataType, AtomicDataType -#include "linkahead/entity.h" // for Entity -#include "caosdb/entity/v1/main.pb.h" // for AtomicDataType, DataType -#include "linkahead/value.h" // for Value +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test, EXPECT_... #include <cstdint> // for int64_t -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... -#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <memory> // for allocator_traits<>::valu... -#include <string> // for string -#include <vector> // for vector +#include <string> // for basic_string, string +#include <vector> // for vector +#include "caosdb/entity/v1/main.pb.h" // for AtomicDataType, DataType, Entity +#include "linkahead/data_type.h" // for AtomicDataType, DataType, List... +#include "linkahead/entity.h" // for Property, Entity, Properties +#include "linkahead/value.h" // for ScalarValue, Value namespace linkahead::entity { using ProtoEntity = caosdb::entity::v1::Entity; diff --git a/test/test_protobuf.cpp b/test/test_protobuf.cpp index 21f67787ecc303545972616a71affbe4a13f085c..ab489ccc6833c445f03314117f28d75b275cfc2f 100644 --- a/test/test_protobuf.cpp +++ b/test/test_protobuf.cpp @@ -19,15 +19,13 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ +#include <google/protobuf/arena.h> // for Arena +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for EXPECT_EQ, Test, TestInfo, TEST +#include "caosdb/entity/v1/main.pb.h" // for Entity, Message, Version, Data... #include "linkahead/data_type.h" // for DataType, ReferenceDataType #include "linkahead/entity.h" // for Entity -#include "caosdb/entity/v1/main.pb.h" // for RepeatedPtrField, Message -#include <google/protobuf/arena.h> // for Arena -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa... -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST -#include <memory> // for allocator namespace linkahead { using ProtoEntity = caosdb::entity::v1::Entity; diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index 6f8705680a80c41be3cddfee7f1cdabf9fe0c338..e41bcedb1fd5785ddd563833851d79730d443196 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -17,28 +17,27 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "linkahead/configuration.h" // for InsecureConnectionConfig... -#include "linkahead/connection.h" // for Connection -#include "linkahead/entity.h" // for Entity -#include "caosdb/entity/v1/main.pb.h" // for Entity -#include "linkahead/exceptions.h" // for ConnectionError -#include "linkahead/result_set.h" // for MultiResultSet, Entity, Resu... -#include "linkahead/status_code.h" // for StatusCode -#include "linkahead/transaction.h" // for Transaction -#include "linkahead/transaction_handler.h" // for MultiTransactionResponse -#include "linkahead/transaction_status.h" // for ConnectionError -#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE -#include <algorithm> // for max -#include <google/protobuf/arena.h> // for Arena -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPa... -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST -#include <memory> // for allocator, unique_ptr -#include <stdexcept> // for out_of_range -#include <string> // for string, basic_string -#include <utility> // for move -#include <vector> // for vector +#include <google/protobuf/arena.h> // for Arena +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TestInfo +#include <filesystem> // for path +#include <memory> // for unique_ptr, make_unique +#include <stdexcept> // for out_of_range +#include <string> // for basic_string, operator+ +#include <utility> // for move +#include <vector> // for vector +#include "caosdb/entity/v1/main.pb.h" // for RetrieveResponse, MultiTra... +#include "linkahead/configuration.h" // for InsecureConnectionConfigur... +#include "linkahead/connection.h" // for Connection +#include "linkahead/entity.h" // for Entity, Role +#include "linkahead/exceptions.h" // for ConnectionError +#include "linkahead/file_descriptor.h" // for FileDescriptor +#include "linkahead/result_set.h" // for MultiResultSet +#include "linkahead/status_code.h" // for StatusCode +#include "linkahead/transaction.h" // for Transaction, Arena, Retrie... +#include "linkahead/transaction_status.h" // for StatusCode, TransactionStatus +#include "linkahead_test_utility.h" // for EXPECT_THROW_STARTS_WITH // IWYU pragma: no_include "net/proto2/public/repeated_field.h" namespace linkahead::transaction { diff --git a/test/test_utility.cpp b/test/test_utility.cpp index 8abe42e6bc77221863d20386a8e5f3b1c7c1312c..c86da802fd26601aa29ef3da08e95c5dac469eb7 100644 --- a/test/test_utility.cpp +++ b/test/test_utility.cpp @@ -20,20 +20,19 @@ * */ +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TestInfo +#include <map> // for _Rb_tree_const_iterator +#include <stdexcept> // for out_of_range +#include <string> // for basic_string, string +#include <utility> // for pair #include "boost/beast/core/detail/base64.hpp" // for encoded_size -#include "linkahead/data_type.h" // for atomicdatatype_names -#include "linkahead/entity.h" // for importance_names, role... +#include "linkahead/data_type.h" // for AtomicDataType, atomic... +#include "linkahead/entity.h" // for Importance, Role, impo... #include "linkahead/status_code.h" // for get_status_description -#include "linkahead/utility.h" // for base64_encode, load_js... -#include "linkahead_test_utility.h" // for TEST_DATA_DIR -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteA... -#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TestInfo -#include <map> // for map, operator!=, _Rb_t... -#include <stdexcept> // for out_of_range -#include <string> // for allocator, string, ope... -#include <utility> // for pair +#include "linkahead/utility.h" // for getEnumValueFromName +#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE namespace linkahead::utility { diff --git a/test/test_value.cpp b/test/test_value.cpp index f39181272adddcb28c009d055fa5943e465d656e..b2770e5be303162d42ef2ea00ef42dce48f78efc 100644 --- a/test/test_value.cpp +++ b/test/test_value.cpp @@ -20,18 +20,16 @@ * */ -#include "linkahead/value.h" // for Value -#include "caosdb/entity/v1/main.pb.h" // for AtomicDataType, DataType +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test, EXPECT... +#include <cmath> // for sqrt, isnan +#include <initializer_list> // for initializer_list +#include <string> // for basic_string, string, operator+ +#include <vector> // for vector +#include "caosdb/entity/v1/main.pb.h" // for AtomicDataType, DataType, Entity #include "linkahead/protobuf_helper.h" // for ProtoMessageWrapper -#include <algorithm> // for max -#include <cmath> // for isnan -#include <gtest/gtest.h> -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... -#include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <initializer_list> // for initializer_list -#include <string> // for string, basic_string -#include <vector> // for vector +#include "linkahead/value.h" // for Value, ScalarValue, AbstractV... namespace linkahead::entity { using ProtoValue = caosdb::entity::v1::Value;