Verifies that creating a Connection to an on-disk database automatically adds the database directory to the VFS file search path.
| 17 | // Verifies that creating a Connection to an on-disk database automatically adds |
| 18 | // the database directory to the VFS file search path. |
| 19 | TEST(FileSearchPathTest, DBInitAddsDBDirToSearchPath) { |
| 20 | auto dbPath = TestHelper::getTempDBPathStr("FileSearchPath.DBInit"); |
| 21 | auto database = std::make_unique<Database>(dbPath, SystemConfig()); |
| 22 | auto conn = std::make_unique<Connection>(database.get()); |
| 23 | |
| 24 | auto expectedDir = fs::path(dbPath).parent_path().lexically_normal().string(); |
| 25 | const auto& searchPath = conn->getClientContext()->getClientConfigUnsafe()->fileSearchPath; |
| 26 | EXPECT_EQ(searchPath, expectedDir); |
| 27 | } |
| 28 | |
| 29 | // Verifies that an in-memory database does not add any entry to the file search path. |
| 30 | TEST(FileSearchPathTest, InMemoryDBHasEmptySearchPath) { |
nothing calls this directly
no test coverage detected