don't use strings for paths

This commit is contained in:
Maxime Van Hees
2025-09-25 16:25:08 +02:00
parent 7f689ae29b
commit 77a53bae86
13 changed files with 54 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
use herodb::rpc::{BackendType, DatabaseConfig};
use herodb::admin_meta;
use herodb::options::BackendType as OptionsBackendType;
use std::path::Path;
#[tokio::test]
async fn test_rpc_server_basic() {
@@ -70,11 +71,11 @@ async fn test_database_name_persistence() {
let _ = std::fs::remove_dir_all(base_dir);
// Set the database name
admin_meta::set_database_name(base_dir, backend.clone(), admin_secret, db_id, test_name)
admin_meta::set_database_name(Path::new(base_dir), backend.clone(), admin_secret, db_id, test_name)
.expect("Failed to set database name");
// Retrieve the database name
let retrieved_name = admin_meta::get_database_name(base_dir, backend, admin_secret, db_id)
let retrieved_name = admin_meta::get_database_name(Path::new(base_dir), backend, admin_secret, db_id)
.expect("Failed to get database name");
// Verify the name matches