tempdb_cockroach

Temporary databases for unit testing


Keywords
test, database, cockroachdb, cockroach, temporary
License
MIT

Documentation

💾 Rust TempDB

Build Status Coverage Status

Temporary databases for unit testing, inspired by tempfile.

Database Crate Documentation Latest
CockroachDB tempdb_cockroach Documentation Latest Version

Example usage

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.
}

Contributing

Feel free to submit pull requests for new databases or other improvements! Run scripts/install-git-hooks to install pre-commit test and formatting hooks.

This project follows the Rust community's Code of Conduct.