[unit test] Complete all providers unit tests #12
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "app_config.hpp"
|
#include "app_config.hpp"
|
||||||
#include "types/startup_exception.hpp"
|
#include "types/startup_exception.hpp"
|
||||||
|
#include "utils/collection.hpp"
|
||||||
#include "utils/error_utils.hpp"
|
#include "utils/error_utils.hpp"
|
||||||
#include "utils/file.hpp"
|
#include "utils/file.hpp"
|
||||||
#include "utils/path.hpp"
|
#include "utils/path.hpp"
|
||||||
@@ -346,7 +347,7 @@ auto rdb_meta_db::remove_item_meta(const std::string &api_path,
|
|||||||
const std::string &key) -> api_error {
|
const std::string &key) -> api_error {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
if (std::ranges::contains(META_PERMANENT_NAMES, key)) {
|
if (utils::collection::includes(META_PERMANENT_NAMES, key)) {
|
||||||
utils::error::raise_api_path_error(
|
utils::error::raise_api_path_error(
|
||||||
function_name, api_path,
|
function_name, api_path,
|
||||||
fmt::format("failed to remove item meta-key is restricted|key|{}",
|
fmt::format("failed to remove item meta-key is restricted|key|{}",
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "app_config.hpp"
|
#include "app_config.hpp"
|
||||||
#include "types/startup_exception.hpp"
|
#include "types/startup_exception.hpp"
|
||||||
|
#include "utils/collection.hpp"
|
||||||
#include "utils/db/sqlite/db_common.hpp"
|
#include "utils/db/sqlite/db_common.hpp"
|
||||||
#include "utils/db/sqlite/db_delete.hpp"
|
#include "utils/db/sqlite/db_delete.hpp"
|
||||||
#include "utils/db/sqlite/db_insert.hpp"
|
#include "utils/db/sqlite/db_insert.hpp"
|
||||||
@@ -307,7 +308,7 @@ auto sqlite_meta_db::remove_item_meta(const std::string &api_path,
|
|||||||
const std::string &key) -> api_error {
|
const std::string &key) -> api_error {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
if (std::ranges::contains(META_PERMANENT_NAMES, key)) {
|
if (utils::collection::includes(META_PERMANENT_NAMES, key)) {
|
||||||
utils::error::raise_api_path_error(
|
utils::error::raise_api_path_error(
|
||||||
function_name, api_path,
|
function_name, api_path,
|
||||||
fmt::format("failed to remove item meta-key is restricted|key|{}",
|
fmt::format("failed to remove item meta-key is restricted|key|{}",
|
||||||
|
Reference in New Issue
Block a user