Skip to content

Commit 4005fcc

Browse files
author
Liubov Didkivska
authored
Remove BadPathMutable and BadPathProtected (#814)
Remove tests and filters. Relates-To: OLPEDGE-419 Signed-off-by: Liubov Didkivska <ext-liubov.didkivska@here.com>
1 parent 307391d commit 4005fcc

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

olp-cpp-sdk-core/tests/cache/DefaultCacheTest.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -459,39 +459,6 @@ TEST(DefaultCacheTest, ExpiredMemTest) {
459459
ASSERT_TRUE(cache.Clear());
460460
}
461461

462-
TEST(DefaultCacheTest, BadPathMutable) {
463-
olp::cache::CacheSettings settings;
464-
settings.disk_path_mutable = std::string("/////this/is/a/bad/mutable/path");
465-
olp::cache::DefaultCache cache(settings);
466-
ASSERT_EQ(olp::cache::DefaultCache::OpenDiskPathFailure, cache.Open());
467-
468-
// Verify that in-memory still works after bad path was set for memcache
469-
std::string key1DataString{"this is key1's data"};
470-
cache.Put("key1", key1DataString, [=]() { return key1DataString; },
471-
(std::numeric_limits<time_t>::max)());
472-
auto key1DataRead =
473-
cache.Get("key1", [](const std::string& data) { return data; });
474-
ASSERT_FALSE(key1DataRead.empty());
475-
ASSERT_EQ(key1DataString, boost::any_cast<std::string>(key1DataRead));
476-
}
477-
478-
TEST(DefaultCacheTest, BadPathProtected) {
479-
olp::cache::CacheSettings settings;
480-
settings.disk_path_protected =
481-
std::string("/////this/is/a/bad/protected/path");
482-
olp::cache::DefaultCache cache(settings);
483-
ASSERT_EQ(olp::cache::DefaultCache::OpenDiskPathFailure, cache.Open());
484-
485-
// Verify that in-memory still works after bad path was set for memcache
486-
std::string key1_data_string{"this is key1's data"};
487-
cache.Put("key1", key1_data_string, [=]() { return key1_data_string; },
488-
std::numeric_limits<time_t>::max());
489-
auto key1_data_read =
490-
cache.Get("key1", [](const std::string& data) { return data; });
491-
ASSERT_FALSE(key1_data_read.empty());
492-
ASSERT_EQ(key1_data_string, boost::any_cast<std::string>(key1_data_read));
493-
}
494-
495462
TEST(DefaultCacheTest, AlreadyInUsePath) {
496463
olp::cache::CacheSettings settings;
497464
settings.disk_path_mutable = olp::utils::Dir::TempDirectory() + "/unittest";

scripts/linux/fv/gitlab-olp-cpp-sdk-core-test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020

2121
echo ">>> Core Test ... >>>"
2222
$REPO_HOME/build/olp-cpp-sdk-core/tests/olp-cpp-sdk-core-tests \
23-
--gtest_output="xml:$REPO_HOME/reports/olp-core-test-report.xml" \
24-
--gtest_filter=-"DefaultCacheTest.BadPathMutable"
23+
--gtest_output="xml:$REPO_HOME/reports/olp-core-test-report.xml"

scripts/linux/nv/gitlab_test_valgrind.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ done
108108
for test_name in "${TEST_TARGET_NAMES[@]}"
109109
do
110110
{
111-
if [[ ${test_name} == "olp-cpp-sdk-core-test" ]] ; then
112-
EXCEPTION="--gtest_filter="-DefaultCacheTest.BadPathMutable""
113-
else
114-
EXCEPTION=""
115-
fi
111+
EXCEPTION=""
116112
FLAKY_CHECK=""
117113
source ${FV_HOME}/${test_name}.variables
118114
test_command="$REPO_HOME/build/${test_name%?????}/tests/${test_name}s \

0 commit comments

Comments
 (0)