diff --git a/repertory/repertory_test/src/providers_test.cpp b/repertory/repertory_test/src/providers_test.cpp index 5fddf92f..3e2a27b1 100644 --- a/repertory/repertory_test/src/providers_test.cpp +++ b/repertory/repertory_test/src/providers_test.cpp @@ -1428,13 +1428,20 @@ static void remove_item_meta_path_not_found(i_provider &provider) { EXPECT_EQ(api_error::item_not_found, res); } -static void remove_item_meta_restricted_names_fail(i_provider &provider) { +static void remove_item_meta_restricted_names_fail(const app_config &cfg, + i_provider &provider) { fmt::println("testing|{}|{}", app_config::get_provider_name(provider.get_provider_type()), __FUNCTION__); - std::string api_path{"/rim_restricted.txt"}; - if (provider.get_provider_type() != provider_type::encrypt) { + std::string api_path; + if (provider.get_provider_type() == provider_type::encrypt) { + auto source_path = + utils::path::combine(cfg.get_encrypt_config().path, {"test.txt"}); + EXPECT_EQ(api_error::success, + provider.get_api_path_from_source(source_path, api_path)); + } else { + api_path = "/rim_restricted.txt"; create_file(provider, api_path); } @@ -1611,7 +1618,7 @@ static void run_tests(const app_config &cfg, i_provider &provider) { remove_item_meta(provider); remove_item_meta_path_not_found(provider); - remove_item_meta_restricted_names_fail(provider); + remove_item_meta_restricted_names_fail(cfg, provider); rename_file(provider); rename_file_fails_if_source_not_found(provider);