test: Do not create data directory for memory databases (#7323)

Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
This commit is contained in:
Bart
2026-06-09 14:32:48 -04:00
committed by GitHub
parent 2cbc3c139e
commit 1bb42b1a82

View File

@@ -387,8 +387,12 @@ void
SHAMapStoreImp::dbPaths()
{
Section const section{app_.config().section(Sections::kNodeDatabase)};
boost::filesystem::path dbPath = get(section, Keys::kPath);
// Skip creating the directory when an in-memory database is used.
if (boost::iequals(get(section, Keys::kType), "memory"))
return;
boost::filesystem::path dbPath = get(section, Keys::kPath);
if (boost::filesystem::exists(dbPath))
{
if (!boost::filesystem::is_directory(dbPath))