Add test to prove creating duplicate column family results in error...

master
Jordan Terrell 6 years ago
parent 562f413f4c
commit ca1c76b2de
  1. 17
      tests/test_column_family.rs

@ -238,3 +238,20 @@ fn test_column_family_with_options() {
}
}
}
#[test]
fn test_create_duplicate_column_family() {
let n = DBPath::new("_rust_rocksdb_create_duplicate_column_family");
{
let mut opts = Options::default();
opts.create_if_missing(true);
opts.create_missing_column_families(true);
let db = match DB::open_cf(&opts, &n, &["cf1"]) {
Ok(d) => d,
Err(e) => panic!("failed to create new column family: {}", e),
};
assert!(db.create_cf("cf1", &opts).is_err());
}
}

Loading…
Cancel
Save