[][src]Crate tempdb_cockroach

Temporary CockroachDB databases for unit testing.

Note: The cockroach binary must be installed on your path. Download it here.

Example

extern crate tempdb_cockroach;

use tempdb_cockroach::TempCockroach;

#[test]
fn test() {
    let db = TempCockroach::new().expect("Failed to create DB");
    println!("Connection string: {}", db.url());

    // Cockroach process and data are cleaned up when db goes out of scope.
}

Structs

TempCockroach

A temporary CockroachDB instance.