Skip to main content

create_test_rw_db_with_datadir

Function create_test_rw_db_with_datadir 

Source
pub fn create_test_rw_db_with_datadir<P>(
    datadir: P,
) -> Arc<TempDatabase<DatabaseEnv>>
where P: AsRef<Path>,
Available on crate feature provider and (crate features test-utils) only.
Expand description

Create read/write database for testing within a data directory.

The database is created at datadir/db, and TempDatabase will clean up the entire datadir on drop.