From fc6192fcf97d117c9fdde8a7ce5b0de799f04aff Mon Sep 17 00:00:00 2001 From: Joscha Schmiedt <joscha@schmiedt.dev> Date: Tue, 3 Sep 2024 10:46:03 +0200 Subject: [PATCH] Fix test errors due to renaming --- include/clinkahead.h | 2 +- include/linkahead/acm/user.h | 2 +- include/linkahead/connection.h | 2 +- include/linkahead/entity.h | 2 +- include/linkahead/exceptions.h | 2 +- include/linkahead/info.h | 6 +++--- include/linkahead/message_code.h | 2 +- include/linkahead/transaction.h | 2 +- include/linkahead/utility.h | 4 ++-- include/linkahead/value.h | 2 +- src/linkahead/configuration.cpp | 10 +++++----- test/test_connection.cpp | 3 ++- ...{test_linkahead.json => test_linkahead_client.json} | 0 13 files changed, 20 insertions(+), 19 deletions(-) rename test/test_data/{test_linkahead.json => test_linkahead_client.json} (100%) diff --git a/include/clinkahead.h b/include/clinkahead.h index 592b668..5f50f59 100644 --- a/include/clinkahead.h +++ b/include/clinkahead.h @@ -225,7 +225,7 @@ int linkahead_authentication_delete_authenticator( * Create a connection instance. * * The connection is needed to create transactions and to initiate any other - * interaction with a CaosDB server. + * interaction with a LinkAhead server. * * Use the destructor function * `linkahead_connection_delete_connection` to free the wrapped diff --git a/include/linkahead/acm/user.h b/include/linkahead/acm/user.h index aa0d205..9a9943a 100644 --- a/include/linkahead/acm/user.h +++ b/include/linkahead/acm/user.h @@ -21,7 +21,7 @@ /** * @brief Users, together with roles, and permissions are a fundamental concept - * of the access controll management of CaosDB. + * of the access controll management of LinkAhead. * * @file linkahead/acm/user.h * @author Timm Fitchen diff --git a/include/linkahead/connection.h b/include/linkahead/connection.h index e7180f1..844f46a 100644 --- a/include/linkahead/connection.h +++ b/include/linkahead/connection.h @@ -63,7 +63,7 @@ using linkahead::transaction::TransactionStatus; using std::filesystem::path; /** - * @brief A reusable connection to a CaosDBServer. + * @brief A reusable connection to a LinkAheadServer. */ class Connection { public: diff --git a/include/linkahead/entity.h b/include/linkahead/entity.h index b80df20..1c75813 100644 --- a/include/linkahead/entity.h +++ b/include/linkahead/entity.h @@ -669,7 +669,7 @@ private: // class Entity /////////////////////////////////////////////////////////////// /** - * Entity is the central and basic data object of CaosDB. + * Entity is the central and basic data object of LinkAhead. * * This class is a wrapper of the Entity class auto-generated by protobuf * (henceforth "ProtoEntity"). diff --git a/include/linkahead/exceptions.h b/include/linkahead/exceptions.h index 85eec4f..2fad1e1 100644 --- a/include/linkahead/exceptions.h +++ b/include/linkahead/exceptions.h @@ -52,7 +52,7 @@ public: }; /** - * @brief The connection to the CaosDB server is down. + * @brief The connection to the LinkAhead server is down. */ class ConnectionError : public Exception { public: diff --git a/include/linkahead/info.h b/include/linkahead/info.h index c71c8f2..237564a 100644 --- a/include/linkahead/info.h +++ b/include/linkahead/info.h @@ -25,7 +25,7 @@ * @file linkahead/info.h * @author Timm Fitschen * @date 2021-07-02 - * @brief General information about the CaosDBServer. + * @brief General information about the LinkAheadServer. */ #include "caosdb/info/v1/main.pb.h" // for VersionInfo #include <cstdint> // for uint32_t @@ -49,8 +49,8 @@ public: * Wrapp a Protobuf VersionInfo object. * * Don't instantiate this version info class. The constructor is only public - * for simpler testing. Create a CaosDBConnection and use - * CaosDBConnection::GetVersionInfo() instead to get the version of the + * for simpler testing. Create a LinkAheadConnection and use + * LinkAheadConnection::GetVersionInfo() instead to get the version of the * server behind the given connection. */ explicit inline VersionInfo(ProtoVersionInfo *info) : info(info){}; diff --git a/include/linkahead/message_code.h b/include/linkahead/message_code.h index e3063d2..0103d40 100644 --- a/include/linkahead/message_code.h +++ b/include/linkahead/message_code.h @@ -27,7 +27,7 @@ /** * MessageCodes for entity messages. * - * In contrast to the status codes, the message codes are part of the CaosDB + * In contrast to the status codes, the message codes are part of the LinkAhead * API. Messages (and their codes) represent the state of the entities in a * transaction or the server. * diff --git a/include/linkahead/transaction.h b/include/linkahead/transaction.h index 6394c22..efe2ae0 100644 --- a/include/linkahead/transaction.h +++ b/include/linkahead/transaction.h @@ -189,7 +189,7 @@ using linkahead::utility::get_arena; class Transaction; /** - * @brief Create a transaction via `CaosDBConnection.createTransaction()` + * @brief Create a transaction via `LinkAheadConnection.createTransaction()` */ class Transaction { public: diff --git a/include/linkahead/utility.h b/include/linkahead/utility.h index d5d9a14..1b739d7 100644 --- a/include/linkahead/utility.h +++ b/include/linkahead/utility.h @@ -35,7 +35,7 @@ using std::filesystem::exists; using std::filesystem::path; /** - * @brief Get the name of the enum value. May be useful for higher-order CaosDB clients. + * @brief Get the name of the enum value. May be useful for higher-order LinkAhead clients. */ template <typename Enum> auto getEnumNameFromValue(Enum v) -> std::string; @@ -52,7 +52,7 @@ auto getEnumNameFromValue<linkahead::entity::Role>(linkahead::entity::Role v) -> /** * @brief Get the enum value from a string. * - * @detail May be useful for higher-order CaosDB clients and only makes sense if specialized. + * @detail May be useful for higher-order LinkAhead clients and only makes sense if specialized. */ template <typename Enum> auto getEnumValueFromName(const std::string &name) -> Enum; diff --git a/include/linkahead/value.h b/include/linkahead/value.h index 42b59ee..78407a3 100644 --- a/include/linkahead/value.h +++ b/include/linkahead/value.h @@ -66,7 +66,7 @@ public: */ virtual ~AbstractValue() = 0; /** - * Return true iff the value is a NULL value (NULL in the CaosDB sense). + * Return true iff the value is a NULL value (NULL in the LinkAhead sense). */ [[nodiscard]] virtual auto IsNull() const noexcept -> bool = 0; /** diff --git a/src/linkahead/configuration.cpp b/src/linkahead/configuration.cpp index 481fb09..8db1f79 100644 --- a/src/linkahead/configuration.cpp +++ b/src/linkahead/configuration.cpp @@ -52,21 +52,21 @@ // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define GET_CONNECTIONS \ if (!this->json_configuration.wrapped) { \ - throw ConfigurationError("This CaosDB client has not been configured."); \ + throw ConfigurationError("This LinkAhead client has not been configured."); \ } \ assert(WRAPPED_JSON_CONFIGURATION(this)->is_object()); \ const auto &configuration = WRAPPED_JSON_CONFIGURATION(this) -> as_object(); \ if (!configuration.contains("connections")) { \ - throw ConfigurationError("This CaosDB client hasn't any configured connections."); \ + throw ConfigurationError("This LinkAhead client hasn't any configured connections."); \ } \ const auto &connections_value = configuration.at("connections"); \ if (connections_value.is_null()) { \ - throw ConfigurationError("This CaosDB client hasn't any configured connections."); \ + throw ConfigurationError("This LinkAhead client hasn't any configured connections."); \ } \ assert(connections_value.is_object()); \ const auto &connections = connections_value.as_object(); \ if (connections.empty()) { \ - throw ConfigurationError("This CaosDB client hasn't any configured connections."); \ + throw ConfigurationError("This LinkAhead client hasn't any configured connections."); \ } namespace linkahead::configuration { @@ -383,7 +383,7 @@ auto ConfigurationManager::mClear() noexcept -> int { auto ConfigurationManager::mLoadSingleJSONConfiguration(const path &json_file) -> void { if (json_configuration.wrapped) { - throw ConfigurationError("This CaosDB client has already been configured."); + throw ConfigurationError("This LinkAhead client has already been configured."); } if (!exists(json_file)) { throw ConfigurationError("Configuration file does not exist."); diff --git a/test/test_connection.cpp b/test/test_connection.cpp index 65d3ffe..aa805ad 100644 --- a/test/test_connection.cpp +++ b/test/test_connection.cpp @@ -47,7 +47,8 @@ class test_connection : public ::testing::Test { protected: void SetUp() override { ConfigurationManager::Clear(); - ConfigurationManager::LoadSingleJSONConfiguration(TEST_DATA_DIR + "/test_linkahead_client.json"); + ConfigurationManager::LoadSingleJSONConfiguration(TEST_DATA_DIR + + "/test_linkahead_client.json"); }; void TearDown() override { ConfigurationManager::Clear(); }; }; diff --git a/test/test_data/test_linkahead.json b/test/test_data/test_linkahead_client.json similarity index 100% rename from test/test_data/test_linkahead.json rename to test/test_data/test_linkahead_client.json -- GitLab